title: Cause PostBack and Call Event Fired By Server-Side Button (ASP.Net Button)
body: <p>I have yet another strange need.  I have a jQuery dialog that has a dynamic button (
  
  <p>My Button that will be "fired":</p>
  
  <pre><code>&lt;asp:Button ID="RenewSubscriptionButton" runat="server" Visible="false" /&gt;
  </code></pre>
  
  <p>My Hidden input with the postback val:</p>
  
  <pre><code>&lt;input type="hidden" id="RenewSubscriptionPostBackValue" runat="server" /&gt;
  </code></pre>
  
  <p>In my page_load:</p>
  
  <pre><code>Me.RenewSubscriptionPostBackValue.Value = _
         Me.Parent.Page.ClientScript.GetPostBackEventReference _
        (Me.RenewSubscriptionButton, String.Empty)
  
  AddHandler Me.RenewSubscriptionButton.Click, AddressOf RenewSubscription
  </code></pre>
  
  <p>In my Asp.net control I have a js function that is called and evaluates the __doPostBack that is generated:</p>
  
  <pre><code>$('#mgrSubPanel').dialog('destroy');
  // cause postback and have it run the workflow...
  eval($("#&lt;%= RenewSubscriptionPostBackValue.ClientID %&gt;").val());
  </code></pre>
  
  <p>It causes postback but doesn't call my function RenewSubscription that's in my code behind.  Not sure if the addressing is failing or what but maybe one of you can see my fault and correct me...</p>
  
  <p>Thanks in advance...</p>