点radiolist某项目弹出新窗口B之后,如何把页面A form中的数据都取到页面B中使用?radiolist所在页面为A ,
弹出新窗口为B
页面A form action的指向页不是B,需要取得数据太多,Request.QueryString也不可行。急等,哪位指点一下,谢谢了。
弹出新窗口为B
页面A form action的指向页不是B,需要取得数据太多,Request.QueryString也不可行。急等,哪位指点一下,谢谢了。
解决方案 »
- 请教高手在ASP.NET中关于“ViewState”的作用?
- 考试系统的页面设计
- 如何通过用户控件的值过滤gridview 中的数据?求教!
- sql语句写不出来了,我要做统计列表,大家帮帮忙
- 献给所有学习C#+asp.net的人!(也请大家贴出自己知道的c#+asp.net的资源,共同进步)
- ArrayList的问题
- web.config里的连接数据字符串是不是被转化了,怎么才能恢复真正的连接字符串.求助,在线等.
- 调用Web Service出错,急啊!!
- javascript如何实现这样的逻辑?
- 如何在TreeView里插入CheckBox
- 利用DrawString向图片上写出的字边缘太锐化,能不能平滑一些。
- 如何在.aspx页面中用二个form呢?
opener.document.all.txtName
....
radiolist的选择改变事件内把页面所要取得值存到一个自定义的public属性内,然后在下一页读取
string _strResource="";
public string strResource
{
get{return _strResource;}
set{_strResource=value;}
}
void radioList事件(sender, e)
{
this.strResource=你要取的值;
Server.Transfer("B");
}Page B
void PageLoad(sender,e)
{
if(!IsPostBack)
{
A a=new A();
Response.Write(a.Resource);
}
}
static string _strResource="";
That's not all: The Server.Transfer method also has a second parameter—"preserveForm". If you set this to True, using a statement such as Server.Transfer("WebForm2.aspx", True), the existing query string and any form variables will still be available to the page you are transferring to.For example, if your WebForm1.aspx has a TextBox control called TextBox1 and you transferred to WebForm2.aspx with the preserveForm parameter set to True, you'd be able to retrieve the value of the original page TextBox control by referencing Request.Form("TextBox1").照此来说,似乎直接在pageB用request方法就可以取得PageA的form对象的值而不用写一个public属性了,我也还没有测试。
再次感谢,不知道是否还有其他的方法。 :)
是否也能回答我的另外一个问题,谢谢了.
http://community.csdn.net/Expert/topic/4230/4230820.xml?temp=5.102175E-02