title: How to use eventargs argument on asp.net button click event
body: <p>It's a bit of a hack, but I'm forcing a postback on the close event of a jquery dialog. </p>
  
  <pre><code>close: function (event, ui) {
      __doPostBack('&lt;%=btnChange.UniqueID %&gt;', 'refreshMe');
  }
  </code></pre>
  
  <p>It works as it should and it raises the click event on the server side (with a minor annoyance of having to turn off the EnableEventValidation since I'm trying to pass in 'refreshMe'). </p>
  
  <p>What I want is to be able to see the 2nd argument ('refreshMe') during the click event so I can know that the postback was caused by the jquery dialog close event. So maybe something like the following is more-or-less what I'm hoping for (but it doesn't work, obviously). </p>
  
  <pre><code>protected void btnChange_Click(object sender, EventArgs e) {
      if (e == "refreshMe")
      {
          // do whatever
      }
      else
      {
          // do whatever
      }
  }
  </code></pre>
  
  <p>Is there some way that I can go about doing this, or am I way off base?</p>
  
  <p>Thanks for the help.</p>
  
  <p><strong>EDIT</strong>
  In order to get this scenario working I had to:
  1) set EnableEventValidation to false (if its true then ASP.NET will throw an error and basically tell you that its unable to validate the request)
  2) I tried setting the value of the hidden __EVENTARGUMENT using jquery, but for whatever reason the value 'refreshMe' never was sent to the server in the argument. What I ended up doing was putting 'refreshMe' in the 2nd argument of the _<em>doPostBack, and then it showed up in the Request["</em>_EVENTARGUMENT"] on the server side.</p>