DataRowView drview = (DataRowView)e.Row.DataItem; if ((e.Row.RowState & DataControlRowState.Edit) > 0) { DropDownList ddExp = (DropDownList)e.Row.FindControl("ddExp"); if (ddExp != null) { ddExp.Text = drview["Expense_Type"].ToString(); } }
string qrystring=Request.querystring["db_column"].tostring();
string somevariable=dr["dbcolumn"].toString(); //if you are using datareader string somevariable=dt.rows[0]["dbcolumn"].tostring(); //if you are using datatable dropdown.selecteditem.text=somevariable; //in this case somevariable should be there in dropdownlist.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)