C#页面跳转判断
叫我编程者 2013-03-19 08:30:24 我有1个新建按钮
/新建按钮
protected void btnNew_Click(object sender, EventArgs e)
{
Response.Redirect("ProductDetails.aspx?product=1"); }
和一个protected void GridShow_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//当鼠标停留时更改背景色
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#9CCBF7';this.style.cursor='hand'");
//当鼠标移开时还原背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
//string strId = GridView1.DataKeys[e.Row.RowIndex].Value.ToString();
e.Row.Attributes.Add("ondblclick", "window.open('ProductDetails.aspx?Product=2 CODE=" + GridShow.DataKeys[e.Row.RowIndex].Value + "')");
}
}
2个都跳转到 'ProductDetails.aspx
那么我在'ProductDetails.aspx表的
protected void Page_Load(object sender, EventArgs e)
{
}里面怎么判断是那个跳过来的?