Как получить значение сеанса с помощью javaScript
sessionStorage.getItem("SessionName")
Precious Pigeon
sessionStorage.getItem("SessionName")
<script type="text/javascript">
function GetUserName()
{
var username = '<%= Session["UserName"] %>';
alert(username );
}
</script>
<script type="text/javascript">
function SetUserName()
{
var userName = "Shekhar Shete";
'<%Session["UserName"] = "' + userName + '"; %>';
alert('<%=Session["UserName"] %>');
}
</script>
How to Access session in javascript