Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

How to get selected item from Dropdown in GridView

protected void LinkButton1_Click(object sender, EventArgs e)
{
  LinkButton lnkBtn = (LinkButton)sender;
  GridViewRow row = (GridViewRow)lnkBtn.NamingContainer;
  DropDownList ddl= (DropDownList)row.FindControl("DropDownList1");
  TextBox1.Text = ddl.SelectedValue.ToString();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #How #selected #item #Dropdown #GridView
ADD COMMENT
Topic
Name
7+9 =