Mega Code Archive

 
Categories / ASP.Net / Network
 

HttpCookie(LoggedIn)

<%@ Page Language="vb" %> <html>    <head>       <title>Setting a Cookie in ASP.NET</title>       <script runat="server">          Sub Page_Load()             Dim myCookie As New HttpCookie("LoggedIn")             myCookie.Value = "True"             myCookie.Expires = DateTime.Now.AddMinutes(30)             Response.Cookies.Add(myCookie)          End Sub       </script>    </head> <body>    <asp:label id="Message" runat="server"/> </body> </html>