Search
 
SCRIPT & CODE EXAMPLE
 

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();
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# float min value 
Csharp :: Popup open close wpf 
Csharp :: c# switch expression pattern matching 
Csharp :: unity normalize movement 
Csharp :: how to compare time strings in c# 
Csharp :: list add value position c# 
Csharp :: rigidbody.velocity.magnitude 
Csharp :: convert rgb to float 
Csharp :: linq select to list 
Csharp :: c# string length 
Csharp :: create class for database connection in c# 
Csharp :: c# split string 
Csharp :: Using Linq to get the last N elements of a collection? C# 
Csharp :: c# console.writeline 
Csharp :: Check if list contains any of another list 
Csharp :: c# reverse a string for loop 
Csharp :: asp.net web forms 
Csharp :: static property in c# 
Csharp :: adding to a dictionary class c# 
Csharp :: c# quick "is" "as" 
Csharp :: VBNet dictionary for each 
Csharp :: remove numericUpDown white space 
Csharp :: C# Datagridview Column Header Double Click 
Csharp :: linq query to fetch parent child data from same table in c# 
Csharp :: custom attribute for auth permission check .net 
Csharp :: how to if button pressed do something in c# 
Csharp :: get link element revit api 
Csharp :: .net entities query multiple join condition type inference 
Csharp :: Custom Encrypted String Type 
Csharp :: remove multiple element on list from index a to b C# 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =