Click here to Skip to main content
13,293,950 members (61,325 online)
Click here to Skip to main content


114 bookmarked
Posted 24 Aug 2002

Cookieless ASP.NET forms authentication

, 25 Aug 2002
They say it is not possible to use cookieless forms authentication in .NET. Well it is, and relatively easy to accomplish!
<%@ Page language="c#" Codebehind="default.aspx.cs" AutoEventWireup="false" Inherits="samplecookieless.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="">
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 122px; POSITION: absolute; TOP: 55px" runat="server">You did it! Wow!</asp:Label>
			<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 32px; POSITION: absolute; TOP: 209px" runat="server" Text="Sign out" ForeColor="Blue" BackColor="#FFC0C0"></asp:Button>
			<asp:Button id="Button2" style="Z-INDEX: 103; LEFT: 182px; POSITION: absolute; TOP: 92px" runat="server" Text="Test butt. After Signout, you cannot [back] and press it" Width="369px" ForeColor="Blue" BackColor="#FFC0C0"></asp:Button>
			<asp:Label id="Label2" style="Z-INDEX: 104; LEFT: 567px; POSITION: absolute; TOP: 94px" runat="server" Visible="False">Wow, you pressed it.</asp:Label>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Hungary Hungary
No Biography provided

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171207.1 | Last Updated 26 Aug 2002
Article Copyright 2002 by brutal
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid