Accessing cells data from GridView with dropdown

Feb 18 2022 11:50 AM

Hello,

I have a GridView that contains 2 rows of data, followed by a dropdownlist.

My issue is, I can not figure out how to get the selected value from the dropdownlist.

 foreach (GridViewRow Row in GridView1.Rows)
{
string ddltext = Row.Cells[2].Text);
}

I tried this but I just get a blank value, I presume this is because I'm referring to the actually cell rather than the dll within the cell?


Answers (1)