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);
精彩评论