<asp:RadioButtonList ID="rdoOffer" onclick="alert('<%= rdoOffer.ClientID %>');" |
runat="server"> |
<asp:ListItem Text="Yes" Value="Y"></asp:ListItem> |
<asp:ListItem Text="No" Value="N"></asp:ListItem> |
</asp:RadioButtonList> |
When putting RadScriptBlock around RadioButtonList, I get an error msg that there is an invalid character.
This snippet is inside an User Control ascx and the main page has AjaxManager.
2009.3.1210.35
I can use RadScriptBlock around a javascript but how do I get it to work in the onClick of the control?
I don't want to create a js function for each control that I need to use it. I would like to pass the clientID of the control to the generic function.
Right now I used AutoPostback="true" but the roundtrip cost is 50k compressed and there is a slight delay.
All I wanted to do in OnClick is to make another <div> section visible or hidden based on the choices.
In validation code I check if the controls in <div> is visibile if so apply validation.
Is it possible to use client script to alter the <div>'s visibility and also have the visibility carry back to server side code on the next autopostback?