I am creating dynamic dropdown in inside gridview.i want to retrive selected value from dropdown. But i get null value.Please solve my problem
for (int i = 0; i < GridView2.Rows.Count; i++)
DropDownList box = (DropDownList)GridView2.Rows[i].Cells.FindControl("murali" + (i + 1).ToString());
I get null value at "box"
You are doing it so wrong! —SA
FindControls looks for control, not for any data in control. It looks for some control by control's name. You result just tells you there is no control with that name. Naturally, you never created one; as this is just part of the data.
You can use
Edited 17-Jan-13 6:43am
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)