I have hosted my web application on iis in my machine.In my page i have a delet button in myy gridview.When i click delete i needed a confirmation message,so i wrote this code.But unfortunately i get this error here. what is the solution for my error.help me friends..
protected void DeleteRecord(object sender, GridViewDeleteEventArgs e)
{
if (!IsPageRefresh)
{
string id = gridRegistrationTableDetails.Rows[e.RowIndex].Cells[2].Text;
if (MessageBox.Show("Are you sure to delete the record?", "Delete Employee Record.!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
deleterecordMethod(id);
BindData();
}
}
}
Pls post me solution for this...