Now consider you would like to display modal dialog using JQuery UI and the respective .js files are already loaded by the main website.The following snippet allows you to display a button from your custom control and generate a script block on the client side to handle the click event.
public class CustomWebControl : WebControl
{
protected override void Render(HtmlTextWriter writer)
{
writer.Write(@"
Text to be displayed in the modal dialog.
");
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "test-dialog-modal_1", @"
");
}
}
This is the simple case of explaining how to achieve it.
The most overlooked advantage to owning a computer is that if they foul up, there's no law against whacking them around a little. ~Eric Porterfield.





0 comments:
Post a Comment