我想问两个ASP。NET上面的问题:
1.
我首先在背景页面上打开一个页面,这个BB页面需要添加一些资料,操作完后关闭该页面,这样我在点击刷新的时候就会跳出BB页面,该怎么解决呢,我就想用服务器的控件2.就是我点击按钮之后为什么背景页面不刷新呢
代码是这样的
string strScript = "window.alert('操作成功');window.returnValue=true;window.focus();window.opener=null;window.close();";
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "成功", strScript, true);
1.
我首先在背景页面上打开一个页面,这个BB页面需要添加一些资料,操作完后关闭该页面,这样我在点击刷新的时候就会跳出BB页面,该怎么解决呢,我就想用服务器的控件2.就是我点击按钮之后为什么背景页面不刷新呢
代码是这样的
string strScript = "window.alert('操作成功');window.returnValue=true;window.focus();window.opener=null;window.close();";
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "成功", strScript, true);
解决方案 »
- 新手请教hello world .cs 程序编译问题
- C# 新手求教各位大虾
- =============C#网络流问题==========
- 求一高效算法!
- 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
- 参数传递
- 用C#作一个文本编辑器的一些问题,希望大家帮帮忙!!!!!!
- 请教WEB上使用MS的TreeView控件出现的几个问题/疑问
- DataSet或DataView中如何实现类似数据库命令 LIKE 的筛选功能?
- 在.net framework sdk中怎样使用C#?C#有没有象delhpi的RAD,如果有该怎样安装使用?
- ManualResetEvent myevent;程序主界面的按钮里和程序的某个线程可能会同时访问修改,需要对myevent同步吗,哪种同步适合这个
- 【急,在线等,分不够再加】在线快来帮忙看看Windows程序中的SQL问题
背景页面:
有一个text框代码:<input id="Text1" type="text" />
一个Button,调用BB页面的代码:
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "", "window.open('BB.aspx')", true);BB页面:
一个Button,按Button后刷新背景页面并将"aaa"传给背景页面中的text框,代码:
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "成功", "window.opener.document.getElementById('Text1').value='aaaa'; window.opener.location.href=window.opener.location.href", true);楼主试试!!
我首先在背景页面上打开一个页面,这个BB页面需要添加一些资料,操作完后关闭该页面,
这样我在点击刷新的时候就会跳出BB页面(我是不想让它跳出来),该怎么解决呢,我就想用服务器的控件
一个Button,调用BB页面的代码:
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "", "window.open('BB.aspx')", true); BB页面:
一个Button,按Button后刷新背景页面并将"aaa"传给背景页面中的text框,代码:
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "成功", "window.opener.document.getElementById('Text1').value='aaaa'; window.opener.location.href=window.opener.location.href", true);