I want to access to session in javascript code so as to set and get some values : i try with this code :
function getsessionvalue() {
var value= '<%= session["role"].ToString() %>';
alert(value);
//var role1= '<%= session["role"] %>'; **the same mistake**
//alert(role1);
}
but i have these javascript mistakes for both :
The type of the expression must be an array type but it resolved to
Type mismatch: cannot convert from String to int