JQuery and ASP.NET Server Controls

JQuery and ASP.NET Server Controls

Hi all,

I have an issue with JQuery and ASP.NET Server Controls. Could anyone please help me on this?

I have asp.net page. I use JQuery to pop up a Modal Dialog. There are some asp.net server controls in this Dialog: some TextBoxt and one Button. My problem is the Click Event of Server Button Control is not postback when Dialog is popped up and the text value I input in the TextBox is always empty in server code.

Below is my code:

<body>
    <form id="form1" runat="server">
    <div>
        <input type="button" id="btnTest1" value="Test 2" onclick="openDlg(); return false;" />
        <div id="dlgTest" title="Test Dialog" runat="server">
            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
            <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
        </div>
    </div>
    </form>
   
    <script language="javascript" type="text/javascript">
   
        $(document).ready(function() {
       
            $("#dlgTest").dialog({
                bgiframe: true, autoOpen: false, height: 380, width: 420, modal: true
            });
        });
       
        function openDlg() {
       
            $('#dlgTest').dialog('open');       
        }
   
    </script>
   
</body>


Thanks so much,