Mega Code Archive

 
Categories / ASP.Net / Session Cookie
 

Write value to session (VB net)

<%@ Page Language="vb" %> <html>    <head>       <title>Writing to Session in ASP.NET</title>       <script runat="server">          Sub Page_Load()             Session("foo") = "Hello, World!"             Message.Text = "Wrote the value 'Hello, World' to a Session item named 'foo'."          End Sub       </script>    </head> <body>    <asp:label id="Message" runat="server"/> </body> </html>