Home > ASP.Net, Jquery > Show jQuery UI Dialog Popup Window from Server Side

Show jQuery UI Dialog Popup Window from Server Side


Hi all,

try this example to Show jQuery UI Dialog Popup Window from Server Side

In Previous post i posted an example

Display JQuery Popup Window from Server Side

HTML Markup :


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css" rel="stylesheet"
type="text/css" />
<script type="text/javascript">
 function ShowPopup(message,title) {
 $(function () {
 $("#dialog").html(message);
 $("#dialog").dialog({
 title: title,
 buttons: {
 Close: function () {
 $(this).dialog('close');
 }
 },
 modal: true
 });
 });
 };
</script>
<div id="dialog" style="display: none">
</div>
<asp:Button ID="btnShowPopup" runat="server" Text="Show Popup" OnClick="btnShowPopup_Click" />

In Code behind :


protected void btnShowPopup_Click(object sender, EventArgs e)
{
 string message = "Changes Updated Successfully";
 string title = " Update Current Tariff Details";
 ClientScript.RegisterStartupScript(this.GetType(), "Popup", "ShowPopup('" + message + "','" + title +
"');", true);
}

Hope this helps

Good Luck.

 

 

Advertisements
Categories: ASP.Net, Jquery
  1. No comments yet.
  1. March 25, 2014 at 7:37 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: