Critical Developers

Programmers Knowledge Base

Solved - jQuery UI Dialog not working in server control not post back using UpdatePanel in jQuery Dialog

1) Why jQuery UI Dialog not working in ? or Why server control in jQuery UI Dialog not working ?


In "open" callback of jQuery Dialog we need to add below line so that it can run under form -



2) Why server control not post back after using UpdatePanel in jQuery Dialog ?


Set "ChildrenAsTriggers" attribute of UpdatePanel to true.

eg.:   <asp:UpdatePanel ID="upSearch" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">


- Please refer the following sample code:-

Pre-requisites to use jQuery Dialogs:-

<!-- [Styles] -->
<link rel="Stylesheet" type="text/css" href="jquery-ui.css" />
<!-- [Scripts] -->
<script src="jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="jquery-ui.min.js" type="text/javascript"></script>

The HTMLization we need to make Dialog:-

<!-- [MARKUPS] -->
<a href="#" title="Open Dialog" onclick="showDialog();">Click to Open Dialog</a>
<!-- Start Dialog -->
  <div id="jqdialog" style="display:none;">
  <asp:UpdatePanel ID="upSearch" UpdateMode="Conditional" ChildrenAsTriggers="true" runat="server">
<asp:TextBox ID="txtSearch" runat="server" MaxLength="50" />
<asp:Button ID="btnSubmit" runat="server" Text="Search" Width="90" OnClick="btnSubmit_Click" />
<!-- End Dialog -->

Function to call/open Dialog:-

function showDialog() {
    var $dialogContent = $("#jqdialog");
        height: 450,
        width: 400,
        modal: true,
        title: "My Form",
        open: function (type, data) {
        buttons: {
            Close: function () {

        close: function () {


Comments (4) -

  • naji

    09-09-2014 12:50:21 |

    its very helpfull

  • architectenbureau

    25-01-2015 20:07:48 |

    I wouldn't say that I wholeheardetly agree but there is some sense to this. On a side note, is this a Wordpress site?


    05-02-2015 11:54:13 |

    I simply want to say I am just new to weblog and honestly liked this web site. Very likely I’m planning to bookmark your website . You absolutely come with remarkable writings. Thanks a lot for revealing your blog.

Comments are closed