Skip to content

Commit a0b6cc9

Browse files
author
Sayedur Rahman
committed
first commit
0 parents  commit a0b6cc9

25 files changed

Lines changed: 15544 additions & 0 deletions

About.aspx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
2+
CodeFile="About.aspx.cs" Inherits="About" %>
3+
4+
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
5+
</asp:Content>
6+
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
7+
<h2>
8+
About
9+
</h2>
10+
<p>
11+
Put content here.
12+
</p>
13+
</asp:Content>

About.aspx.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
8+
public partial class About : System.Web.UI.Page
9+
{
10+
protected void Page_Load(object sender, EventArgs e)
11+
{
12+
13+
}
14+
}

Account/ChangePassword.aspx

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<%@ Page Title="Change Password" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
2+
CodeFile="ChangePassword.aspx.cs" Inherits="Account_ChangePassword" %>
3+
4+
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
5+
</asp:Content>
6+
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
7+
<h2>
8+
Change Password
9+
</h2>
10+
<p>
11+
Use the form below to change your password.
12+
</p>
13+
<p>
14+
New passwords are required to be a minimum of <%= Membership.MinRequiredPasswordLength %> characters in length.
15+
</p>
16+
<asp:ChangePassword ID="ChangeUserPassword" runat="server" CancelDestinationPageUrl="~/" EnableViewState="false" RenderOuterTable="false"
17+
SuccessPageUrl="ChangePasswordSuccess.aspx">
18+
<ChangePasswordTemplate>
19+
<span class="failureNotification">
20+
<asp:Literal ID="FailureText" runat="server"></asp:Literal>
21+
</span>
22+
<asp:ValidationSummary ID="ChangeUserPasswordValidationSummary" runat="server" CssClass="failureNotification"
23+
ValidationGroup="ChangeUserPasswordValidationGroup"/>
24+
<div class="accountInfo">
25+
<fieldset class="changePassword">
26+
<legend>Account Information</legend>
27+
<p>
28+
<asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword">Old Password:</asp:Label>
29+
<asp:TextBox ID="CurrentPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
30+
<asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
31+
CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Old Password is required."
32+
ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
33+
</p>
34+
<p>
35+
<asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword">New Password:</asp:Label>
36+
<asp:TextBox ID="NewPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
37+
<asp:RequiredFieldValidator ID="NewPasswordRequired" runat="server" ControlToValidate="NewPassword"
38+
CssClass="failureNotification" ErrorMessage="New Password is required." ToolTip="New Password is required."
39+
ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
40+
</p>
41+
<p>
42+
<asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword">Confirm New Password:</asp:Label>
43+
<asp:TextBox ID="ConfirmNewPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
44+
<asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
45+
CssClass="failureNotification" Display="Dynamic" ErrorMessage="Confirm New Password is required."
46+
ToolTip="Confirm New Password is required." ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:RequiredFieldValidator>
47+
<asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword" ControlToValidate="ConfirmNewPassword"
48+
CssClass="failureNotification" Display="Dynamic" ErrorMessage="The Confirm New Password must match the New Password entry."
49+
ValidationGroup="ChangeUserPasswordValidationGroup">*</asp:CompareValidator>
50+
</p>
51+
</fieldset>
52+
<p class="submitButton">
53+
<asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel"/>
54+
<asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword" Text="Change Password"
55+
ValidationGroup="ChangeUserPasswordValidationGroup"/>
56+
</p>
57+
</div>
58+
</ChangePasswordTemplate>
59+
</asp:ChangePassword>
60+
</asp:Content>

Account/ChangePassword.aspx.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
8+
public partial class Account_ChangePassword : System.Web.UI.Page
9+
{
10+
protected void Page_Load(object sender, EventArgs e)
11+
{
12+
13+
}
14+
}

Account/ChangePasswordSuccess.aspx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<%@ Page Title="Change Password" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
2+
CodeFile="ChangePasswordSuccess.aspx.cs" Inherits="Account_ChangePasswordSuccess" %>
3+
4+
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
5+
</asp:Content>
6+
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
7+
<h2>
8+
Change Password
9+
</h2>
10+
<p>
11+
Your password has been changed successfully.
12+
</p>
13+
</asp:Content>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
8+
public partial class Account_ChangePasswordSuccess : System.Web.UI.Page
9+
{
10+
protected void Page_Load(object sender, EventArgs e)
11+
{
12+
13+
}
14+
}

Account/Login.aspx

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<%@ Page Title="Log In" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
2+
CodeFile="Login.aspx.cs" Inherits="Account_Login" %>
3+
4+
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
5+
</asp:Content>
6+
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
7+
<h2>
8+
Log In
9+
</h2>
10+
<p>
11+
Please enter your username and password.
12+
<asp:HyperLink ID="RegisterHyperLink" runat="server" EnableViewState="false">Register</asp:HyperLink> if you don't have an account.
13+
</p>
14+
<asp:Login ID="LoginUser" runat="server" EnableViewState="false" RenderOuterTable="false">
15+
<LayoutTemplate>
16+
<span class="failureNotification">
17+
<asp:Literal ID="FailureText" runat="server"></asp:Literal>
18+
</span>
19+
<asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="failureNotification"
20+
ValidationGroup="LoginUserValidationGroup"/>
21+
<div class="accountInfo">
22+
<fieldset class="login">
23+
<legend>Account Information</legend>
24+
<p>
25+
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Username:</asp:Label>
26+
<asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
27+
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
28+
CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required."
29+
ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
30+
</p>
31+
<p>
32+
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
33+
<asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
34+
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
35+
CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required."
36+
ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
37+
</p>
38+
<p>
39+
<asp:CheckBox ID="RememberMe" runat="server"/>
40+
<asp:Label ID="RememberMeLabel" runat="server" AssociatedControlID="RememberMe" CssClass="inline">Keep me logged in</asp:Label>
41+
</p>
42+
</fieldset>
43+
<p class="submitButton">
44+
<asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="LoginUserValidationGroup"/>
45+
</p>
46+
</div>
47+
</LayoutTemplate>
48+
</asp:Login>
49+
</asp:Content>

Account/Login.aspx.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.UI;
6+
using System.Web.UI.WebControls;
7+
8+
public partial class Account_Login : System.Web.UI.Page
9+
{
10+
protected void Page_Load(object sender, EventArgs e)
11+
{
12+
RegisterHyperLink.NavigateUrl = "Register.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);
13+
}
14+
}

Account/Register.aspx

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<%@ Page Title="Register" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
2+
CodeFile="Register.aspx.cs" Inherits="Account_Register" %>
3+
4+
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
5+
</asp:Content>
6+
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
7+
<asp:CreateUserWizard ID="RegisterUser" runat="server" EnableViewState="false" OnCreatedUser="RegisterUser_CreatedUser">
8+
<LayoutTemplate>
9+
<asp:PlaceHolder ID="wizardStepPlaceholder" runat="server"></asp:PlaceHolder>
10+
<asp:PlaceHolder ID="navigationPlaceholder" runat="server"></asp:PlaceHolder>
11+
</LayoutTemplate>
12+
<WizardSteps>
13+
<asp:CreateUserWizardStep ID="RegisterUserWizardStep" runat="server">
14+
<ContentTemplate>
15+
<h2>
16+
Create a New Account
17+
</h2>
18+
<p>
19+
Use the form below to create a new account.
20+
</p>
21+
<p>
22+
Passwords are required to be a minimum of <%= Membership.MinRequiredPasswordLength %> characters in length.
23+
</p>
24+
<span class="failureNotification">
25+
<asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
26+
</span>
27+
<asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification"
28+
ValidationGroup="RegisterUserValidationGroup"/>
29+
<div class="accountInfo">
30+
<fieldset class="register">
31+
<legend>Account Information</legend>
32+
<p>
33+
<asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
34+
<asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
35+
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
36+
CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required."
37+
ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
38+
</p>
39+
<p>
40+
<asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
41+
<asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>
42+
<asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email"
43+
CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required."
44+
ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
45+
</p>
46+
<p>
47+
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
48+
<asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
49+
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
50+
CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required."
51+
ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
52+
</p>
53+
<p>
54+
<asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
55+
<asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
56+
<asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic"
57+
ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired" runat="server"
58+
ToolTip="Confirm Password is required." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
59+
<asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword"
60+
CssClass="failureNotification" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
61+
ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
62+
</p>
63+
</fieldset>
64+
<p class="submitButton">
65+
<asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="Create User"
66+
ValidationGroup="RegisterUserValidationGroup"/>
67+
</p>
68+
</div>
69+
</ContentTemplate>
70+
<CustomNavigationTemplate>
71+
</CustomNavigationTemplate>
72+
</asp:CreateUserWizardStep>
73+
</WizardSteps>
74+
</asp:CreateUserWizard>
75+
</asp:Content>

Account/Register.aspx.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Security;
6+
using System.Web.UI;
7+
using System.Web.UI.WebControls;
8+
9+
public partial class Account_Register : System.Web.UI.Page
10+
{
11+
12+
protected void Page_Load(object sender, EventArgs e)
13+
{
14+
RegisterUser.ContinueDestinationPageUrl = Request.QueryString["ReturnUrl"];
15+
}
16+
17+
protected void RegisterUser_CreatedUser(object sender, EventArgs e)
18+
{
19+
FormsAuthentication.SetAuthCookie(RegisterUser.UserName, false /* createPersistentCookie */);
20+
21+
string continueUrl = RegisterUser.ContinueDestinationPageUrl;
22+
if (String.IsNullOrEmpty(continueUrl))
23+
{
24+
continueUrl = "~/";
25+
}
26+
Response.Redirect(continueUrl);
27+
}
28+
29+
}

0 commit comments

Comments
 (0)