Passing Session variables (ASP.NET)
Hi,
I've been working on a site for quite a while and am a fair way in using Javascript. However I thought I'd check out a bit of asp.net as it has quite a few functions that seem easier to implement than in Javascript.
I have a login page created using the built-in server behaviours that sets a session variable in Javascript using the following line of code:
Session("MM_Username") = MM_valUsername;
This variable is avalable to all other javascript pages and I can disply the variable on a page by placing this lin eof code within the HTML:
<%= Session("MM_Username") %>
However the one page that I have created using vb.net will not display the variable. The code I'm using is this:
<% =Session("MM_Username")%>
Is there a reason for this or am I just doing something wrong?
Thanks in advance
Dan ![]()
