Trouble Shooting: Unable to perform postback from Jquery Dialog

Problem Description:

From Jquery Dialog when you click on the button and if it has a corresponding click event on server side code, the code won’t get executed.


You need to add the below code to perform postback when user click on button in Jquery dialog.


Complete Code

<html xmlns="">
<head runat="server">
    <link rel="stylesheet" href="//">
    <script src="//"></script>
    <script src="//"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">
        $(function () {
                autoOpen: false

            $("#Button1").click(function (evt) {
                var dlgwnd = $("#dialog").dialog("open");
                //Add the below code and Postback will occur fine with out any problem
    <form id="form2" runat="server">
        <div id="dialog" title="Dialog">
            Sample Text Content
            <asp:Button ID="Button2" runat="server" Text="OK" OnClick="Button2_Click" />

        <asp:Button ID="Button1" runat="server" Text="Open Dialog" OnClientClick="return false" />

  1. Leave a comment

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: