如何在asp.net中单击按钮时打开aspx作为弹出窗口 [英] how to open aspx as popup window when button click in asp.net
本文介绍了如何在asp.net中单击按钮时打开aspx作为弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想打开一个页面作为弹出窗口。
它正在运行,但它也显示浏览器是mozilla firefox ............用最小化,最大化,关闭按钮。
i不想显示那些。
i只显示我的弹出页面
这是我写的代码
请检查并解决我的问题
Hi,
I want to open a page as popup window.
it is working but it also show the browser that is mozilla firefox............with minimize,maximize,close buttons.
i don't want to show those.
i have to show only my popup page only
this is the code i wrote it
please check it and give solutions to my problem
<script type="text/javascript">
function basicPopup()
{
popupWindow = window.open("empchoosefoldertosavepopup.aspx", 'popUpWindow', 'height=300,width=600,left=100,top=30,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
}
</script>
<asp:Button ID="Button2" runat="server" Text="Save to Folder" BackColor="#990000"Font-Bold="True" ForeColor="White" OnClientClick="basicPopup();return false;"
/>
推荐答案
您好b $ b
为什么要将window.open设置为变量以及声明的变量在哪里。如果您想获得任何返回值或将窗口显示为模态对话,请使用以下代码
Hi
Why are you aasigning window.open to a variable and where is that variable declared. If you want to get any return value or show the window as a modal dialogue please use the following code
var strReturn = window.showModalDialog('URL Name', null,
'status:no;dialogWidth:250px;dialogHeight:300px;dialogHide:true;help:no;scroll:yes');
希望这会有所帮助。
谢谢&问候
Sriman
Hope this helps.
Thanks & Regards
Sriman
最好使用window.Modalshow对话来满足您的要求。
as:
it is better to use window.Modalshow dialogue for your requirement.
as:
var popupStyle = "dialogheight=300px;dialogwidth=450px;dialogleft:200px;dialogtop:200px;status:no;help:no;";
var var1 = window.showModalDialog(url,this, '', popupStyle);
使用弹出模式代替弹出窗口。
Use pop up Modal instead of pop up window.
这篇关于如何在asp.net中单击按钮时打开aspx作为弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文