how to use sessions with javascript code example
Example 1: javascript sessionStorage
var setsession = window.sessionStorage.setItem("animals", "cat");
var getsession = window.sessionStorage.getItem("animals");
console.log(getsession);
Example 2: set a value in session using javascript
<script type="text/javascript">
function GetUserName()
{
var username = '<%= Session["UserName"] %>';
alert(username );
}
</script>