Hi everyone,
I have a problem with gridview as i'm new to web application and expecting a solution to the below code. It goes like this,
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
GridView row = GridView1.SelectedRow;
txtLastName.Text = GridView1.SelectedRow.RowIndex[0].ToString();
txtFirstName.Text = GridView1.SelectedRow.RowIndex[1].ToString();
txtEmailAddress.Text = GridView1.SelectedRow.RowIndex[2].ToString();
txtPhoneNumber.Text = GridView1.SelectedRow.RowIndex[3].ToString();
txtDOB.Text = GridView1.SelectedRow.RowIndex[4].ToString();
}
how shall i proceed. I'm getting error it reads like this Cannot apply indexing with [] to an expression of type 'int'
Thanks in advance