GridView里实现Radio单选
一.在ASPX中创建一个GridView控件,并绑定Radio客户端控件 < asp : GridView ID ="GridMediaList" runat ="server" AutoGenerateColumns ="False" OnSelectedIndexChanged ="GridMediaList_SelectedIndexChanged"> < Columns > < asp : TemplateField > < ItemTemplate > < input name ="RadioButton1" type ="radio" value =' <% # Eval("ID") %> ' onclick ="setRadio(this);" /> </ ItemTemplate > </ asp : TemplateField > </ Columns > </ asp : GridView > 二.添加相关的JavaScript脚本 < script language ="javascript" type ="text/javascript"> function setRadio(nowRadio) { var myForm,objRadio; myForm=document.forms[0]; for ( var i=0;i<myForm.length;i++