'asp.net Textbox value is null when post bock with Jquery Dialog occured

I have Asp.net text box in < div> tag which after click on "btnReply",< div> showes by Jquery Dialog, so user write idea at text box and click "Send" button (jquery dialog button) and post back happend.

but the asp.net text box value at server side is null . Why ? my code is here :

     <div id="ReplyDiv"  style="display:none;">
             <asp:TextBox ID="txtReply" runat="server" Textmode="MultiLine"/>
     </div>

     <input type="button" id="btnReply" onclick="javascript:retuen ShowReplyDialog();"/>

      <asp:Button ID="AspBtnReply" runat="server" OnClick="AspBtnReply_Click" class="hidden"/>

     /*-----Jquery script----*/
    <script type="text/javascript">
      function ShowReplyDialog()
       {
         $("#ReplyDiv").dialog({
            width: 580,          
            buttons: {
               "Close": function () { $(this).dialog("close");} , 
               "Send" : function () {
                   //----Call Asp.net server method here
                   $("#<%=AspBtnReply.ClientID %>").click();
               }                    
            }
         }).parent().appendTo($("form:first"));
      }
    </script>


Solution 1:[1]

Use hidden field value to store the textbox value

var Des = $("#txtDesc").val();
$("#hid").val(Des);

hid is the id of hidden field.

Solution 2:[2]

I've just faced the same issue and after two hours effort i found the form tag in my bootstrap Modal. I've removed the form tag and value is receving in backend.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aarif Qureshi
Solution 2 Moeed