I have a dropdownlist with below values and Submit button at bottom of page
I have this dropdownlist placed in gridview and display the listitem accordingly to the rows. But I have a condition where If the value is China in any row in gridview Then user should be promted with an error message when click on Submit button. Else if any of the rows are not china, then user should proceed.
Something like that
foreach (GridViewRow row in this.gridView.Rows)
{
DropDownList ddl = row.FindControl("ddlName") as DropDownList;
if(ddl != null)
{
//check here
}
}