点radiolist项目弹出新窗口之后,如何把radiolist所在页面的form数据都取到新窗口中?急等。。。

tristones 2005-08-25 03:32:04
点radiolist某项目弹出新窗口B之后,如何把页面A form中的数据都取到页面B中使用?

radiolist所在页面为A ,
弹出新窗口为B
页面A form action的指向页不是B,需要取得数据太多,Request.QueryString也不可行。

急等,哪位指点一下,谢谢了。

...全文
86 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
win3721 2005-10-19
  • 打赏
  • 举报
回复
up
tristones 2005-10-19
  • 打赏
  • 举报
回复
to 红枫
是否也能回答我的另外一个问题,谢谢了.
http://community.csdn.net/Expert/topic/4230/4230820.xml?temp=5.102175E-02
tristones 2005-10-19
  • 打赏
  • 举报
回复
谢谢红枫,我查了一下Server.Transfer方法,有如下描述
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属性了,我也还没有测试。
再次感谢,不知道是否还有其他的方法。 :)
aspdotnet2005 2005-10-19
  • 打赏
  • 举报
回复
因为我没试,如果取不到值就把这句改成
static string _strResource="";

aspdotnet2005 2005-10-19
  • 打赏
  • 举报
回复
Page A
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);
}
}
tristones 2005-10-19
  • 打赏
  • 举报
回复
谢谢,能否给段简单的伪码?
aspdotnet2005 2005-10-19
  • 打赏
  • 举报
回复
Transfer(目的页)
radiolist的选择改变事件内把页面所要取得值存到一个自定义的public属性内,然后在下一页读取
tristones 2005-10-19
  • 打赏
  • 举报
回复
能否给出更具体的说明?谢谢
time_is_life 2005-08-25
  • 打赏
  • 举报
回复
用javascript :
opener.document.all.txtName
....

62,254

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧