本文介绍了从服务器端代码打开弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,..
在检查了一些条件后,我想从服务器端打开一个模式弹出窗口.
我尝试了许多代码,但是它们没有用.
这是我现在正在使用的..
Hello guys..,
I want to open a modal popup from server side after checking some condtions.
I tried many codes but they didn''t work.
Here''s what I am using now ..
string strScript;
Type jsType = ObjPage.GetType();
ClientScriptManager CS = ObjPage.ClientScript;
strScript = "javascript:window.showModalDialog(''ChangePassword.aspx'');";
System.Web.UI.ScriptManager.RegisterClientScriptBlock(this, jsType, "LoginButton", strScript, true);
任何帮助将不胜感激....
Any help will be appreciated....
推荐答案
<asp:ModalPopupExtender ID="mpeDemo" BehaviorID="mpebDemo" runat="server" TargetControlID="hylPopup"
PopupControlID="Panel1" BackgroundCssClass="popupwrapper_transparentbg" DropShadow="false"
RepositionMode="RepositionOnWindowScroll" PopupDragHandleControlID="pnlConnectDragHandle"
OkControlID="lbtnCancel" />
请从服务器上执行以下操作:
Please do the following from Server:
Button1_Click(object sender, EventArgs e)
{
//some login write here...
mpeDemo.Show(); //then open the AJAX Modal Window
}
如有任何疑问,请让我知道.
如果对您有帮助,请提供投票.
谢谢,
Imdadhusen
Please do let me know, if you have any doubt.
Please provide Vote if this would be helpful to you.
Thanks,
Imdadhusen
这篇关于从服务器端代码打开弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!