我新建了两个页面,webfrom1.aspx wenfrom2.aspx(下面简称1,2),在1里面有个label,在2里面有一个按钮,我想在按钮里面实现修改label的text值。
这是代码:
protected void Button1_Click(object sender, EventArgs e)
{
Label l = (Label)Page.FindControl("Label1");
l.Text = "12312";
Response.Redirect("WebForm1.aspx");
}
可是老是提示未将对象引用到实例请教一下怎么实现。。
这是代码:
protected void Button1_Click(object sender, EventArgs e)
{
Label l = (Label)Page.FindControl("Label1");
l.Text = "12312";
Response.Redirect("WebForm1.aspx");
}
可是老是提示未将对象引用到实例请教一下怎么实现。。
1触发2,把2的值给sesson,返回后1取sesson的值
1:首先在页面1点击按钮A,按钮A的客户端事件为把你在页面1所填内容保存进cookie
2:按钮A服务端事件为跳转到页面2,页面2的初始化事件把你的这些cookie写入到页面2的控件里