How to Pass/access value from javascript to C# page load
<p>I have tried below approach.</p>

<ol>
<li><p>I used one hidden field on aspx page named hdnTime.</p>

<p></p></li>
<li><p>Then I assigned value to hidden field in javascript function.</p>

<pre><code>&lt;script type='text/javascript'&gt;
     function getLocalTimeZone() {
         document.getElementById('ctl00_bcr_hdnTime').value = 10;
         var hidden = document.getElementById('ctl00_bcr_hdnTime');
         var timezone = String(new Date());             
         hidden.value = timezone.substring(timezone.lastIndexOf('(') + 1).replace(')', '').trim();             
     }
</code></pre>

<p></p></li>
<li><p>Then on C# page load I tried below code.</p>

<pre><code>ScriptManager.RegisterStartupScript(Page, GetType(), "disp_confirm", "getLocalTimeZone()", true);

string test = hdnTime.Value;
</code></pre></li>
</ol>

<p>But I am getting blank value for hdnTime.</p>

<p>Please let me know if I missing something here.</p>