我在 modalpopup 中有一个 detailsview,它应该在我的 gridivew 中显示选定的行,但它只显示我的 gridview 中的第一行。我做错了什么?感谢您的帮助。
protected void gvStudent_SelectedIndexChanged(object sender, EventArgs e)
{
this.dvstudent.Visible = true;
this.dvstudent.DataBind();
this.UpdatePanelDetailsView1.Update();
this.modalstudent.Show();
}
protected void Selecttomodifystudent_Click(object sender, EventArgs e)
{
LinkButton buttonstudent = sender as LinkButton;
GridViewRow row = (GridViewRow)buttonstudent.NamingContainer;
this.sqlModifyStudent1.SelectParameters.Clear();
this.dvstudent.DataBind();
this.UpdatePanelDetailsView1.Update();
this.modalstudent.Show();
}