title: How to set Session Variable in C# Using ContentUpdate
body: <p>Well, the question seems very straightforward, but it isn't.</p>
  
  <p>I want to set a session variable like the following:</p>
  
  <pre><code>Session["mySession"] = "Some Value";
  </code></pre>
  
  <p>But I want to do so when clicking on a button, and using <code>ContentUpdate</code>:</p>
  
  <pre><code>protected void myButtonClick(object sender, EventArgs e)
  {
      Session["mySession"] = "Some Value";
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;asp:Button ID="myButton" runat="server" OnClick="myButtonClick" /&gt;
  </code></pre>
  
  <p>Ok, so far so good. It works, and it has always worked. Now let's talk about the problem.</p>
  
  <p>The only way I can get it working on an iPhone is to set session variable is on the Page_Load function. It works when browsing from my computer.</p>
  
  <p>So, I guess my question is:</p>
  
  <p>How to set a Session Variable in C# Using <code>ContentUpdate</code> on an Iphone?</p>