title: Postback without a control context
body: <p>I have a situation where I want to use several server side controls, which have clients side state.  I want to check the state when events occur (like various clicks), and when the state is where i want it, I want to postback to the server and do some processing.</p>
  
  <p>In particular, I need to make sure that at least 3 different controls have selections before I want to do a postback.  Since there is no specific control that will initiate the postback, I just want to capture the selection events on the client side, then call __doPostBack() (or something similar) to initiate the processing.  So i have disabled all server side events, turned off autopostback, and have wired up some javascript to handle this.</p>
  
  <p>I've got all the client side code written and working, however I cannot seem to get the server-side to recognize the postback.  I'm overriding RaisePostBackEvent, and checking the eventArgument for my custom argument.  This doesn't work, as RaisePostBackEvent is never called.</p>
  
  <p>This method has worked when I had autopostback enabled (for example, the Telerik Radgrid OnSelectChanged server side event).</p>
  
  <p>Any suggestions on the best way to handle this?</p>
  
  <p>Update:</p>
  
  <p>When asked for sample code, it's exactly as I say above.  Not rocket science.</p>
  
  <p>Javascript:</p>
  
  <pre><code>function CheckState(source, eventArgs) {
      // logic to test state of controls
      __doPostBack("", "DoMyWork:");
  }
  </code></pre>
  
  <p>Then in code behind I have:</p>
  
  <pre><code>protected override void RaisePostBackEvent(IPostBackEventHandler source, string eventArgument)
  {
      if (eventArgument.IndexOf("DoMyWork") != -1)
      {
          // do my server side work.
      }
  }
  </code></pre>
  
  <p>RESOLUTION:</p>
  
  <p>Because this is somewhat confusing.. I'll just say what my solution was.</p>
  
  <p>I used one of the controls involved in the postback and used it's UniqueID for the control parameter, then my method as the event.</p>