我试图从源页面将选定的ID号码发布到新的目标页面(弹出窗口)并在该页面上显示更多详细信息。从Gridview将新值发布到新窗口Selected列
我使用了各种解决方案,但看起来像他们有点过时。 这是我的问题:
什么是最好的方式发布它(session?cookie?)或Page.PreviousPage.FindControl
?或者添加一个控件到<ItemTemplate>
?或Javascript?
我不想使用查询字符串,因为我不希望用户手动修改它。
我应该在目标页面上写什么来获取该值?
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
string testID= GridView1.SelectedRow.Cells[3].Text;
// eg. Session["ID"] = testID;
//eg. open new pop up window ("target.aspx");
}
许多THX
OP说:“我不想使用查询字符串,因为我不想用户手动修改它。” – Marko 2010-07-27 03:01:13
@Marko没有看到那句话。我已经编辑了我的帖子,包括使用会话变量做同样的事情。 – rebelliard 2010-07-27 04:07:43
以及对查询字符串..我想我会采取查询字符串的解决方案。 thx – Kiddo 2010-07-27 06:22:45