i have 2 RadioButton in my webform- Why I can check both?
I have 2 RadioButton in my WebForm - Why I can check both?
I want that if I check one - the other wil开发者_JAVA技巧l be un-checked (like in WinForm)
how to do it (asp.net)?
thanks
RadioButton.GroupName Property
Gets or sets the name of the group that the radio button belongs to.
They both need to have the same name
attribute for this to work.
As CD has pointed out, this can be set inside of your aspx page using the GroupName
attribute on an ASP.NET radio control. This will render the name
attribute in the outputted HTML markup.
精彩评论