tags:

views:

62

answers:

1

Hi everyone, i would like to call a jquery dialog box (so html, css,javascript ) via asp.net Server Side event. Is it possible ?

Thank you

A: 

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);
Nick Craver