title: C# Webforms - cannot send values set by jquery to server
body: <p>I am getting screen resolution of the client using jquery and setting label text. and in page load of back end c# code i am trying to access that. but as page load is executed first, I am not able to get the data set to label. I tried calling another c# function on some button click but on button click as it is runat server, according to my knowledge the page is reloaded and values are reset again so i am not getting values.
  c# code is below where i am accessing width and height this did not work in pageload and button click function.</p>
  
  <pre><code>  string front = "width:" + width.Text + ";height:" + height.Text + 
    ";background - color: gray";
  </code></pre>
  
  <p>Jquery</p>
  
  <pre><code> $(document).ready(function () {
       $("#&lt;%= width.ClientID %&gt;").text(screen.width);
       $("#&lt;%= height.ClientID %&gt;").text(screen.height);
   });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;asp:Label ID="width" runat="server" Text="Label"&gt;&lt;/asp:Label&gt;
  &lt;asp:Label ID="height" runat="server" Text="Label"&gt;&lt;/asp:Label&gt;
  </code></pre>
  
  <p>Note: On load the values are set and displayed on screen</p>