Hi all,
try this example to Get Selected Value of HTML Radio inside a GridView control
1) Open VS 20010 and create a new web site and add new web page
2) From ToolBox drag and drop Gridview , Lable and Button Control
3) Bind your Gridview using SQLDataSource to Categories table in Northwind database
protected void btn_Get_Click(object sender, EventArgs e)
{
string selectedValue = Request.Form["MyRadioButton"];
lbl_Value.Text ="You select Category with ID " + selectedValue;
}
No comments:
Post a Comment