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

Join 132,360 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,244 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
post 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

Go to the top of the page

Jayman
post 30 Sep, 2008 - 08:23 AM
Post #2


Student of Life

Group Icon
Joined: 26 Dec, 2005
Posts: 6,839



Thanked 38 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 offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 04:38AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month