ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Access Session value in JavaScript function in ASP.Net<p>C#</p> <pre class="brush: csharp">protected void Page_Load(object sender, EventArgs e) { string ab = (string)Session[&#34;UserID&#34;]; // Read session Session[&#34;myValue&#34;] = ab; }</pre> <p>&nbsp;script</p> <pre class="brush: html">&lt;script type=&#34;text/javascript&#34;&gt; var yourSessionValue = &#39;&lt;%= Session[&#34;myValue&#34;] %&gt;&#39;; alert(yourSessionValue); &lt;/script&gt;</pre> <p>&nbsp;</p> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/151522/Access-Session-value-in-JavaScript-function-in-ASPNet/https://www.aspforums.net:443/Threads/151522/Access-Session-value-in-JavaScript-function-in-ASPNet/Tue, 04 Sep 2018 04:04:53 GMT