window.showModalDialog是javascript里面的函数,这样可以达到你要的效果:
string msg="window.showModalDialog('DialogPage.aspx');";
Response.Write("<script language=javascript>"+msg+"</script>");
string msg="window.showModalDialog('DialogPage.aspx');";
Response.Write("<script language=javascript>"+msg+"</script>");
解决方案 »
- 用repter实现对已选择的用户操作
- devexpress如何汉化?
- 简单问题:aspx文件怎么引用.CSS文件的?
- TreeView问题,请教大家!急~~~~~~~!谢谢
- 请问.dll怎么运行的?
- 急,引用word,execl的问题,谢谢
- 请高手们帮帮我这个初学者:用sqlconnection连接SQL SERVER2000,我用SA登录时提示用户登录失败,未与信任SQL SERVER连接相关联。
- EntityFramework创建表间关系的问题
- 超级郁闷,搞了一天,一个有趣的图片上传问题,在线等。。。。。
- 自定义控件中加控件的问题
- 请帮忙把三个ASP的句子转换成ASP.NET的,谢谢。:)
- 怎样弹出对话框
code:var retval=window.showModalDialog("DialogPage.aspx");比如DialogPage.aspx是一个框架它包括
<frameset rows="0,*" border="0" frameSpacing="0" frameBorder="0">
<frame name="header" src="a.aspx" scrolling="no" noresize>
<frame name="main" src='b.aspx'>
</frameset>
然后在a.aspx文件中(javascript 代码)
function btnOK_onclick() {
//设置返回值
top.returnValue = document.getElementById("checkedItemValue").value;
window.close();
}
var return=window.showModalDialog("DialogPage.aspx",return,"width:500px;........");回传:
window.returnValue=return;
window.close();接收:
if(return!=null)
{
document.getElementById("控件名").innerText = return;
}
Response.Write("<script>window.open("Dialogpage.aspx")</script>");
上面的window.showModalDialog("DialogPage.aspx",return,"width:500px;........");
直接这样写不行的,不识别window,应该引用命名空间么?请指教?