aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

jQuery - How to Display Popup Window on Button Click in

May 12, 2014

Here I will explain how to display popup window on button click in using jQuery ui modal popup window or open jQuery modal popup window on button click in

In previous articles I explained
jquery show popup window during pageload, jquery simple modal popup window example, jQuery show alert message while leaving from website, jQuery enable / disable controls on page, jQuery Countdown timer script example and many articles relating to JQuery and Now I will explain how to display popup window on button click in using jQuery ui modal popup window.

To show popup window on button click we need to write the code like as shown below

<html xmlns="">
<title>jQuery Show Modal Popup from code behind or server side</title>
<link type="text/css" rel="stylesheet" href="" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
$(function() {
$('#<%=btnclick.ClientID%>').click(function() {
title: "jQuery Popup from Server Side",
width: 430,
height: 250,
modal: true,
buttons: {
Close: function() {
return false;

<form id="form1" runat="server">
<div id="popupdiv" title="Basic modal dialog" style="display: none">
<b> Welcome to</b>
<table align="center" style="margin-top:200px">
<asp:Button ID="btnclick" runat="server" Text="Show Modal Popup" />


If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email


Anonymous said...

I m trying to open Popup in wordpress how?. because it's open in HTML..

Anonymous said...

Its really helpful post. Thanks.

Anonymous said...

hi, the code doest not work, can you please confirm ?

pabitra behera said...


and in cs file

protected void Button1_Click(object sender, EventArgs e)

Server side events not working

Vicky said...

if I use 1.11.0 version of jquery then it is not working

Give your Valuable Comments

Other Related Posts

© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.