Re: Radiobuttonlist onclick event
From: Chris Jackson (chrisjATmvpsDOTorgNOSPAM)
Date: 03/10/04
- Next message: Curt_C [MVP]: "Re: Can you help me with this code? It's really urgent. Thank You. Miguel"
- Previous message: Tim Mulholland: "unknown postback"
- In reply to: Dan: "Radiobuttonlist onclick event"
- Messages sorted by: [ date ] [ thread ]
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.
>
>
- Next message: Curt_C [MVP]: "Re: Can you help me with this code? It's really urgent. Thank You. Miguel"
- Previous message: Tim Mulholland: "unknown postback"
- In reply to: Dan: "Radiobuttonlist onclick event"
- Messages sorted by: [ date ] [ thread ]