You can’t, JavasSript is used for client side scripting on the browser , and cannot access a Session object from a server. JavaScript runs in the clients browser, your Session object is exposed by the server.
Can we use session in ASPX page?
You can’t, JavasSript is used for client side scripting on the browser , and cannot access a Session object from a server. JavaScript runs in the clients browser, your Session object is exposed by the server.