Losing Textbox value on postback
<p>In a page I have a link; clicking on it opens a dialog and sets a textbox value for that dialog.</p>

<p>However, once I click on submit in that dialog, the textbox value is null.</p>

<p>Link:</p>

<pre><code>&lt;a href="#" onclick="javascript:expand('https://me.yahoo.com');
jQuery('#openiddialog').dialog('open'); return false;"&gt;
&lt;img id="yahoo" class="spacehw" src="/Content/Images/spacer.gif" /&gt;&lt;/a&gt;
</code></pre>

<p>Script:</p>

<pre><code>&lt;script type="text/javascript"&gt;
  jQuery(document).ready(function () {
    jQuery("#openiddialog").dialog({
        autoOpen: false,
        width: 600,
        modal: true,
        buttons: {
           "Cancel": function () {
              $(this).dialog("close");
           }
        }
    });
});
function expand(obj) {
    $("#&lt;%=openIdBox.ClientID %&gt;").val(obj);
}
</code></pre>

<p></p>

<p>Dialog:</p>

<pre><code>&lt;div id="openiddialog" title="Log in using OpenID"&gt;
&lt;p&gt;
    &lt;asp:Label ID="Label1" runat="server" Text="OpenID Login" /&gt;
    &lt;asp:TextBox ID="openIdBox" EnableViewState="true" runat="server" /&gt;
    &lt;asp:JButton Icon="ui-icon-key" ID="loginButton" runat="server" Text="Authenticate" OnClick="loginButton_Click" /&gt;
    &lt;asp:CustomValidator runat="server" ID="openidValidator" ErrorMessage="Invalid OpenID Identifier" ControlToValidate="openIdBox" EnableViewState="false" OnServerValidate="openidValidator_ServerValidate" /&gt;
    &lt;br /&gt;
    &lt;asp:Label ID="loginFailedLabel" runat="server" EnableViewState="False" Text="Login failed" Visible="False" /&gt;
    &lt;asp:Label ID="loginCanceledLabel" runat="server" EnableViewState="False" Text="Login canceled" Visible="False" /&gt;
&lt;/p&gt;
&lt;/div&gt;
</code></pre>
