I can't figure out how to access the value of a control in a dynamically-created gridview. Thhe problem is that I don't know the name of the control. If I knew the name of the control I could do just do this :
string dropDownListText =((DropDownList).row.FindControl("DropDownList1")).SelectedItem.Value;`
I know the type of control and I know the cell it is in. Is there any way using the information about the control I have to be able to access the control's value?
View Source Codeafter thePostBackfor this dynamically created control. As per my understanding, it should be lost duringPostBack. All theDynamically/Compile timegeneratedControlswill beDisposedby End of thePage Life Cycle.