Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,789 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,306 people online right now. Registration is fast and FREE... Join Now!




login page in c#

 
Reply to this topicStart new topic

login page in c#

nskabhishek
30 Sep, 2008 - 01:25 AM
Post #1

New D.I.C Head
*

Joined: 30 Sep, 2008
Posts: 2

im new to asp.net. i created a login.aspx page. but i dont know how to write the code for login.aspx.cs page using the windows authentication for checking the username and password. so please help me..

my code for login.aspx is

CODE


<%@ Page Language="C#" MasterPageFile="~/Master1.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<br />
<table width="992">
<tr></tr>
<tr></tr>
<tr>
    <td style="width: 100px"></td>
    <td style="width: 100px"></td>
    <td style="width: 100px"></td>
    <td>
        <table>
            <tr>        
                <td align="center"><asp:Label ID="lblUsername" runat="server" Text="Username : "></asp:Label></td>
                <td><asp:TextBox ID="txtUsername" runat="server"></asp:TextBox></td>
            </tr>
            <tr>        
                <td align="center"><asp:Label ID="lblPassword" runat="server" Text="Password : "></asp:Label></td>
                <td><asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox></td>
            </tr>            
            <tr>
                <td></td>
                <td align="left"><asp:Button ID="btnLogin" runat="server" Text="Sign In" Width="104px" OnClick="btnLogin_Click" /></td>                
            </tr>
        </table>
        <table>
            <tr>
                <td><asp:Label ID="lblSignUp" runat="server" Text="Not a Registered User?"></asp:Label></td>
                <td><asp:HyperLink ID="hlnkSignUp" runat="server" NavigateUrl="~/Register.aspx">Click Here</asp:HyperLink></td>
            </tr>
        </table>        
    </td>
    <td style="width: 100px"></td>
    <td style="width: 100px"></td>
</tr>
</table>
</asp:Content>


User is offlineProfile CardPM
+Quote Post

Jayman
RE: Login Page In C#
30 Sep, 2008 - 08:23 AM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 6,955



Thanked: 43 times
Dream Kudos: 500
Expert In: C#, VB.NET, Java

My Contributions
You can find everything you need to know about implementing windows authentication here.
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 01:28PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month