if (e.CommandName == "Edit") { pnlUpdate.Visible = true; pnlDelete.Visible = false; string Code = e.Item.FindControl("base_NationalCode").ToString(); }
Quote:Object reference not set to an instance of an object
string Code = e.Row.Cells[index].Text.ToString()
YourControlType yc = (YourControlType)e.Row.FindControl("base_NationalCode"); string Code = string.Empty; if(yc!=null) Code = yc.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)