System。EventArgs 并不包含“CommandName”和“Item”
代码如下,该怎么修改,求大大们指导~protectedvoidGridView1_SelectedIndexChanged(objectsender,EventArgse...
代码如下,该怎么修改,求大大们指导~
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
if (e.CommandName == "title")
{
int n = e.Item.DataSetIndex;
Session["mainid"] = dataset.Tables["mainforum"].Rows[n]["id"].ToString();
Session["zhuti"] = dataset.Tables["mainforum"].Rows[n]["title"].ToString();
this.GridView1.DataBind();
Server.Transfer("subforum.aspx");
}
} 展开
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
if (e.CommandName == "title")
{
int n = e.Item.DataSetIndex;
Session["mainid"] = dataset.Tables["mainforum"].Rows[n]["id"].ToString();
Session["zhuti"] = dataset.Tables["mainforum"].Rows[n]["title"].ToString();
this.GridView1.DataBind();
Server.Transfer("subforum.aspx");
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询