if (dt.Rows[rowIndex]["Zone"].ToString() == null || dt.Rows[rowIndex]["Zone"].ToString() == "") dropdownlist1.SelectedValue = null; else dropdownlist1.SelectedValue = dt.Rows[rowIndex]["Zone"].ToString();
dropdownlist1.Items.Insert(0, ""); dropdownlist1.SelectedIndex(0);
if (dt.Rows.Count > 0) { // Your logic regarding data - setting control values , etc ... ... dropdownlist1.SelectedValue = dt.Rows[rowIndex]["Zone"].ToString(); ... ... }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)