Click here to Skip to main content
15,611,080 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

How to create log in page using Session and cookies in (Using C# coding)

Thanks and Regards,
Updated 25-Mar-22 15:51pm
Prasad Khandekar 25-Apr-13 3:03am    
Not clear what you really want to achieve.

You could use forms authentication MSDN - Explained: Forms Authentication in ASP.NET 2.0[^] Then you don't have to reinvent the wheel..
Share this answer
First of all, I suggest you get knowing the built-in features like membership and role providers. Here you have a tutorial about the sql based implementation of it. Quite simple to use: Understanding ASP.NET Roles and Membership - A Beginner's Tutorial[^].

But you don't need to use membership if you have good reason not to use something that is well built, and reliable, and (more or less) secure. Here are some alternatives:[^][^]
Share this answer
Share this answer

Login Form


<asp:textbox id="TextBox1" runat="server">

<asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server"
controltovalidate="TextBox1" errormessage="Please Enter Your Username"


<asp:textbox id="TextBox2" textmode="word" runat="server">

<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server"
controltovalidate="TextBox2" errormessage="Please Enter Your word"

<asp:button id="Button1" runat="server" text="Log In" onclick="Button1_Click">

<asp:label id="Label1" runat="server">

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900