开发者

Call a jquery modal box by server side event

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜