项目需求,一共有三个页面,A.ASPX;B.ASPX;C.ASPX
在A页面点击按钮后弹出一个B页面,焦点在B页面上,点击B页面上的按钮,打开C页面,并把B页面上的几个数值传送到C页面上。
我是这样操作的,在A页面上点击按钮后使用showModelessDialog调出B页面,在b页面点击按钮使用OPEN调出C页面,并使用Session传值。这种方法导致C页面无法接受到Session传来的值;
在A页面上点击按钮后使用open调出B页面,在b页面点击按钮使用OPEN调出C页面,并使用Session传值。这种方法C页面可以接受到Session传来的值,但是在打开B页面的时候,没有锁定焦点,也是不合要求。
请教各位高手,有没有更好的解决方法
在A页面点击按钮后弹出一个B页面,焦点在B页面上,点击B页面上的按钮,打开C页面,并把B页面上的几个数值传送到C页面上。
我是这样操作的,在A页面上点击按钮后使用showModelessDialog调出B页面,在b页面点击按钮使用OPEN调出C页面,并使用Session传值。这种方法导致C页面无法接受到Session传来的值;
在A页面上点击按钮后使用open调出B页面,在b页面点击按钮使用OPEN调出C页面,并使用Session传值。这种方法C页面可以接受到Session传来的值,但是在打开B页面的时候,没有锁定焦点,也是不合要求。
请教各位高手,有没有更好的解决方法
解决方案 »
- 这样把硬盘上的图片存进sql2005数据库?
- 有关工资帐套及计算公式
- FreeTextBox放到frame里出错!!!!!!!!!!!!!
- 在gridview里面的rowdatabound事件里面如何获得行数
- datareader的read方法
- vs05 的Treeview的treenode如果绑定XML文档?
- asp.net如何实现datagrid的分页显示
- 怎样才能得到file upload中所上传文件的完整文件路径?
- 倾囊求教,在asp.net页面中如何调用一个.exe文件。
- 为什么asp.net程序编译生成的Dll文件不能释放?
- 请问IHttpHandler能够输出2进制的文件流吗?
- 如果文本里面出现引号 双引号如何解决
string str= RequestQuerString["str"];//接收
Response。Redirect(“c.aspx?str=你要传送的参数”)//传送
string str= Request.QuerString["str"];//接收
cookie呢?
我的A.aspx是主页面,通过showModelessDialog打开对话框B.aspx,(因为在打开B.aspx后需要不能操作A.aspx和B.aspx无法使用后退键)
在B.aspx点击按钮时,需要打开c.aspx页面,并把b.aspx的数值传送过去。
你这种做法是错误的,实际开发不会这么干,
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title> <script language="javascript" type="text/javascript">
// <!CDATA[ function Button1_onclick() {
window.open("B.aspx");
} function Button2_onclick() {
window.showModalDialog("B.aspx");
}// ]]>
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Button1" type="button" value="Open" onclick="return Button1_onclick()" /><input id="Button2"
type="button" value="Show" onclick="return Button2_onclick()" /></div>
</form>
</body>
</html>B.aspx
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title> <script language="javascript" type="text/javascript">
// <!CDATA[ function Button1_onclick() {
window.open("C.aspx?c=" + document.getElementById("Text1").value);
}
// ]]>
</script>
</head>
<body onload='document.getElementById("Text1").value=opener?"Open":"showModalDialog"'>
<form id="form1" runat="server" defaultfocus="Text1">
<div>
<input id="Text1" name="Text1" type="text" /><br />
<input id="Button1" type="button" value="button" onclick="return Button1_onclick()" /></div>
</form>
</body>
</html>B.aspx.cs
Session["test"] = "OK";
Response.Write("Session test:"+Session["test"].ToString());C.aspx.cs
if (null != Session["test"])
{
Response.Write("Session test:"+Session["test"].ToString());
}
else
{
Response.Write("Session lost");
}
Response.Write("<br>");
if (null != Request.QueryString["c"])
{
Response.Write("QueryString c:" + Request.QueryString["c"]);
}
else
{
Response.Write("QueryString lost");
}