how to access generated groupname for asp radiobutton

Posted by rap-uvic on Stack Overflow See other posts from Stack Overflow or by rap-uvic
Published on 2010-03-22T17:31:17Z Indexed on 2010/03/22 17:41 UTC
Read the original article Hit count: 463

Filed under:

Hi,

I need to access radiobutton groupname in my jquery. However, groupname that's rendered for an asp radiobutton is kind of different. Example:

<asp:RadioButton runat="server" GroupName="payment" ID="creditcard" Checked="true" value="creditcard" />

will generate:

<input type="radio" checked="checked" value="creditcard" name="ctl00$ContentPlaceHolder1$payment" id="ctl00_ContentPlaceHolder1_creditcard">

I can't work with <%=creditcard.GroupName%> in jquery. Is there a way I can get the generated groupname or name for it?

© Stack Overflow or respective owner

Related posts about ASP.NET