login some part coding

nirveshverma 0 Tallied Votes 153 Views Share

hey buddies:)
here is login page for begining purpose in
i hope you will enjoy it
and it is expected there is some mistakes also
so please feedback it.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
  <P>      E-mail Address:<br />
        <asp:TextBox ID="emailtextbox" runat="server" Height="16px" Width="331px"></asp:TextBox>
   <asp:RequiredFieldValidator ID="emailreq" runat="server"
   errormessage="Email Address Is Required!"
   setfocusonerror="true" display=Dynamic />
   <asp:RegularExpressionValidator ID="emailvalidator" 
   runat="server" controltovalidate="emailtextbox"
   errormessage="you must enter valid email" />
    <!-- Username -->
Username:<br />
<asp:TextBox id="usernameTextBox" runat="server" />
<asp:RequiredFieldValidator id="usernameReq"
ErrorMessage="Username is required!" />
<!-- Password -->
Password:<br />
<asp:TextBox id="passwordTextBox" runat="server"
TextMode="Password" Height="16px" Width="251px" />
<asp:RequiredFieldValidator id="passwordReq"
ErrorMessage="Password is required!" />
<!-- Submit Button -->
<p>Address:<br />
<asp:TextBox ID="addresstextbox" runat="server"
 TextMode="SingleLine" Height="21px" Width="314px"/>
<asp:RequiredFieldValidator ID="addressreq"
controltovalidate="addresstextbox" errormessage="Please Enter your Address" />

            <asp:TextBox ID="TextBox1" runat="server" Height="22px" 
                ontextchanged="TextBox1_TextChanged" Width="314px"></asp:TextBox>
        <p>Birthdate: <br />
            <asp:TextBox ID="birthdatetextbox" runat="server" />
            <asp:RangeValidator ID="birthdaterangetest" runat="server"
            type="Date" ControlToValidate="birthdatetextbox" 
            MinimumValue="1/1/1970" MaximumValue="12/31/1999"
            ErrorMessage="You must enter value in b/w 1900 to 1999 to acess this feature" />
           <asp:RequiredFieldValidator ID="bithdatereq"
           controltovalidate="birthdatetextbox" ErrorMessage="It must to enter your birthdate" />
<asp:Button id="submitButton" runat="server"
Text="Submit" onclick="submitButton_Click" />

guru_sarkar 0 Junior Poster in Training

1: not sure if you want that regularExpression for email. If you select RgexValidator in Designmode and look at ValidationExpression propertie you can select Internet Email address

i.e. \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

2: You BirthDate validator had Value 1970-1999 but your error message says 1900-1999.

nirveshverma -1 Light Poster

oh really sorry for this and thanks for indicating my fault and i have said that mistakes are probable.

nirveshverma -1 Light Poster

keep reply and feedback

Bukhari1986 -4 Newbie Poster

not working with my website :(
my website supports .net2.0 only

umamahesh2020 -5 Light Poster

while you are putting this into a Table It looks Perfect.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.