Cómo obtener el valor de la sesión usando JavaScript
sessionStorage.getItem("SessionName")
Precious Pigeon
sessionStorage.getItem("SessionName")
BY LOVE
sessionStorage.setItem("SessionName", "SessionValue");
<script type="text/javascript">
function GetUserName()
{
var username = '<%= Session["UserName"] %>';
alert(username );
}
</script>
<script type="text/javascript">
function SetUserName()
{
var userName = "Shahid Bhat";
'<%Session["UserName"] = "' + userName + '"; %>';
alert('<%=Session["UserName"] %>');
}
</script>