my update panel not update ..?

Posted by Hemachandranvperumal under ASP.NET on 11/28/2012 | Points: 10 | Views : 709 | Status : [Member] | Replies : 2
this is my grid view selectedindexchanged..

my drop down list control not working ....occur exception


protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{

Txtstudentname.Text = GridView1.SelectedRow.Cells[1].Text;
DropDownListcollegename.Text = GridView1.SelectedRow.Cells[2].Text;
DropDownListdegree.Text = GridView1.SelectedRow.Cells[3].Text;
Txtmobilenumber.Text = GridView1.SelectedRow.Cells[4].Text;
DropDownListpurpose.Text = GridView1.SelectedRow.Cells[5].Text;
DropDownListdistrict.Text = GridView1.SelectedRow.Cells[6].Text;
Txtremindingdate.Text = GridView1.SelectedRow.Cells[7].Text;
}




Responses

Posted by: Hariinakoti on: 11/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi hemanth,
u can try like this
DropDownListCollegename.SelectedItem.Text=GridView1.SelectedRow.Cells[2].Text;

Thanks & Regards
Hari

Hemachandranvperumal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 11/29/2012 [Member] Starter | Points: 25

Up
0
Down
if(!page.IsPostBack())
{
//inlude all code here

}

Hemachandranvperumal, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response