开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜