开发者

Call a jquery modal box by server side event

开发者 https://www.devze.com 2022-12-30 03:36 出处:网络
i would like to call a jquery dialog box (so html, css,javascript ) via asp.net Server Side event. Is it p开发者_如何学运维ossible ?

i would like to call a jquery dialog box (so html, css,javascript ) via asp.net Server Side event. Is it p开发者_如何学运维ossible ?

Thank you


First define the script to run on the client, something like this (change options as needed):

var myScript = "$('#myDialog').dialog();";

Then in ASP.Net if you're in an UpdatePanel situation:

ScriptManager.RegisterStartupScript(myPanel, typeof(UpdatePanel), "showDialog",
                                    myScript, true);

Or, if you're in a normal full page situation:

ClientScript.RegisterStartupScript(typeof(Page), "showDialog",
                                   myScript, true);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号