Re: Radiobuttonlist onclick event

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Chris Jackson (chrisjATmvpsDOTorgNOSPAM)
Date: 03/10/04


Date: Wed, 10 Mar 2004 11:52:59 -0500

That is a bug in the framework.

http://support.microsoft.com/default.aspx?scid=kb;[LN];309338

You'll need to switch to using <input type="Radio"> if you need client side
attributes written.

-- 
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
-- 
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
-- 
"Dan" <dan@dontspam.com> wrote in message 
news:OBszImqBEHA.2576@TK2MSFTNGP11.phx.gbl...
> I'm binding a datasource to a Radiobuttonlist like this:
>
>    rbtnLocations.DataSource = MyDataReader
>    rbtnLocations.DataTextField = "ID"
>    rbtnLocations.DataValueField = "LocationName"
>    rbtnLocations.DataBind()
>
> I want to add an onclick event that will acquire the currently selected
> radio button.
>
> Something as simple as popping a javascript alert like this:
>
> rbtnLocations.Attributes.Add("onClick", "alert('You selected - '" &
> rbtnLocations.ClientID & ".SelectedItem')")
>
> This doesn't work - any ideas anyone?
>
> Thanks, Dan.
>
> 

Quantcast