I am looking for a way to send information received in a jQuery dialog to a server in ASP.Net. Initially, I thought this would work with an asp button's hidden button, but clicking doesn't seem to submit the form. Here is the code that I still have:
<script type="text/javascript"> jQuery(document).ready(function() { var dlg = jQuery("#dialog").dialog({ bgiframe: true, autoOpen: false, height: 150, width: 300, modal: true, buttons: { "Add": function() { var btn = document.getElementById("<%=btnAdd.ClientID %>"); if (btn) btn.click(); $(this).dialog("close"); } } }); $("#dialog").parent().appendTo("#dialog_target"); }); </script>
<div id="hidden" style="visibility:hidden" > <asp:Button ID="btnAdd" runat="server" style="display:none" OnClick="btnAdd_Click" /> <div id="dialog" title="New Additional Skill"> <label>Additional Skill Name:</label> <asp:TextBox ID="_txtNewSkillName" runat="server" /> </div>
Any pointers?
source share