不同页面之间传值除了Cookie,Session之外,还可以使用页面的上下文对象
来源:互联网 发布:c语言中实参和形参 编辑:程序博客网 时间:2024/05/17 00:56
如何在一个页面中显示另外一个页面:
<body>
<form id="form1" runat="server">
<iframe src="WebForm.aspx" style="width:500px; height:400px"></iframe>
</form>
</body>
----------------------------------------------------------------------------------------------------
如何使用HttpContext传递页间数据:
WebForm1:
protected void Button1_Click(object sender, EventArgs e)
{
string data = "世界你好";
this.Context.Items.Add("DATA",data);
//不能使用this.Response.Redirect("WebForm1.aspx"),地址栏的URL不变
this.Server.Transfer("WebForm1.aspx");
}
<body>
<form id="form1" runat="server">
<iframe src="WebForm.aspx" style="width:500px; height:400px"></iframe>
</form>
</body>
----------------------------------------------------------------------------------------------------
如何使用HttpContext传递页间数据:
WebForm1:
protected void Button1_Click(object sender, EventArgs e)
{
string data = "世界你好";
this.Context.Items.Add("DATA",data);
//不能使用this.Response.Redirect("WebForm1.aspx"),地址栏的URL不变
this.Server.Transfer("WebForm1.aspx");
}
WebForm2:
protected void Page_Load(object sender, EventArgs e)
{
this.Response.Write(this.Context.Items["DATA"].ToString());
}
- 不同页面之间传值除了Cookie,Session之外,还可以使用页面的上下文对象
- JS 不同页面之间的传值
- javaweb关于两个项目session传递以及不同项目之间页面传值的总结
- cookie,request,session与application页面之间参数的传递
- spring mvc 页面与页面之间的对象传值
- 如何不同的页面和hook之间传值?
- 微信小程序不同页面之间的传值
- 不同页面之间传递值
- 浏览器设置(除了页面百分比之外,还有“字体大小”)
- 使用session在不同页面之间传递参数,sqldatasource按条件查询
- 在不同页面设置与获取cookie值的实例
- 9.26 Cookies(加强),Session对象(页面之间传值,安全性)
- cookie不同页面访问不到的问题
- 不同页面之间传递值(使用Page.PreviousPage.FindControl)
- Session与Cookie会话及页面传值
- 获取document对象除了getElement方法,居然还可以使用css选择器方法!!!
- Cookie页面传值
- HTML页面不同数据格式之间的渲染
- asp.net2.0密码强度验证
- asp.net2.0新特点
- Linux 下获取LAN中指定IP的网卡的MAC(物理地址)
- javascript 右键菜单
- 重写flex的validator类来限制文本输入
- 不同页面之间传值除了Cookie,Session之外,还可以使用页面的上下文对象
- 导出到word文档--带有表格
- 一款轻量级的桌面WebServer通讯组件
- javascript 右键菜单 (续)
- 调用WebSerivice 添加web引用
- VegaGIS2007年测评情况
- Linux那些事儿 之 戏说USB(10)好戏开始了
- struts+dao+hibernate模式
- 2个经典的SOCKET攻击程序