ASP.NET Page /UserLogin/CreateUser.aspx (C#)
Uses Code Behind Page Page /UserLogin/CreateUser.aspx.cs (C#)
1: <%@ Page Language="C#" MasterPageFile="~/Master/MasterPage.master" AutoEventWireup="True" Inherits="QuiznetOnline.Web.UI.UserLogin.CreateUser" Title="Create account" Codebehind="CreateUser.aspx.cs" %>  
2: <%@ MasterType VirtualPath="~/Master/MasterPage.master" %>  
3: <%@ Register Src="~/Controls/AddressInput.ascx" TagName="Control" TagPrefix="ucAddressInput" %>  
4:   
5: <%@ Reference Control="~/Controls/AddressInput.ascx" %>  
6:   
7: <asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" Runat="Server">  
8:   
9: <script language="javascript">  
10:     function CheckEmail(source, arguments) {  
11:         if (trim(arguments.Value.toLowerCase()) == 'guest@quiznetonline.com') {  
12:             arguments.IsValid = false;  
13:         } else {  
14:             arguments.IsValid = true;  
15:         }  
16:     }  
17:   
18:     function trim(myString)      
19:     {      
20:         return myString.replace(/^s+/g,'').replace(/s+$/g,'')      
21:     }  
22: </script>  
23:   
24:    <br />  
25:    <br />  
26: <center>  
27: <asp:CreateUserWizard ID="CreateNewUserWizard" MembershipProvider="AspNetSqlProvider" runat="server" CssClass="Content_Table" ContinueButtonText="Log In" OnCreatingUser="CreateNewUserWizard_CreatingUser" LoginCreatedUser="False" ContinueDestinationPageUrl="~/default.aspx" OnNextButtonClick="CreateNewUserWizard_NextButtonClick" StartNextButtonText="Send" BorderStyle="Solid" BorderWidth="1px" CancelDestinationPageUrl="~/Default.aspx" DisplayCancelButton="True" Width="90%">  
28:       <WizardSteps>  
29:          <asp:WizardStep ID="WizardStep1" runat="server" Title="Sign Up For Your New User Account" StepType="Start">  
30:             <table cellspacing="0" width="100%" cellpadding="0" border="0" style="border-collapse: collapse;" align="center">  
31:                <tr>  
32:                   <td align="center">  
33:                      <table border="0" width="100%">  
34:                         <tr>  
35:                            <td colspan="2" class="sectionHeader">  
36:                               <asp:Label ID="Label1" runat="server" Font-Bold="True">Sign up for your new user account</asp:Label>  
37:                            </td>  
38:                         </tr>  
39:                         <tr>  
40:                            <td width="30%" align="right">  
41:                               <asp:Label ID="RequestEmailLabel" runat="server" AssociatedControlID="RequestEmailLabel">E-mail:</asp:Label>  
42:                            </td>  
43:                            <td align="left">  
44:                               <asp:TextBox ID="RequestEmailTextBox" runat="server" Width="50%" AutoCompleteType="Email"></asp:TextBox>  
45:                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Invalid email format" ControlToValidate="RequestEmailTextBox" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>  
46:                               <asp:RequiredFieldValidator ID="RequestEmailRequired" runat="server" ControlToValidate="RequestEmailTextBox" ErrorMessage="E-mail is required." ToolTip="E-mail is required." ValidationGroup="CreateNewUserWizard">*</asp:RequiredFieldValidator>  
47:                               <asp:CustomValidator runat="server" ControlToValidate="RequestEmailTextBox" ClientValidationFunction="CheckEmail" ErrorMessage="Cannot use guest@quiznetonline.com" />  
48:                            </td>  
49:                         </tr>  
50:                         <tr>  
51:                            <td align="right">  
52:                                <asp:Label ID="ConfirmEmailLabel" runat="server" AssociatedControlID="ConfirmEmailTextBox">Confirm E-mail:</asp:Label>  
53:                            </td>  
54:                            <td align="left">  
55:                                <asp:TextBox ID="ConfirmEmailTextBox" runat="server" Width="50%" AutoCompleteType="Email"></asp:TextBox>  
56:                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Invalid email format" ControlToValidate="ConfirmEmailTextBox" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>  
57:                                <asp:RequiredFieldValidator ID="ConfirmEmailRequired" runat="server" ControlToValidate="ConfirmEmailTextBox" ErrorMessage="Confirm E-mail is required." ToolTip="Confirm E-mail is required." ValidationGroup="CreateNewUserWizard">*</asp:RequiredFieldValidator>  
58:                            </td>  
59:                         </tr>  
60:                         <tr>  
61:                            <td colspan="2" style="text-align:left">  
62:                                <asp:CompareValidator ID="EmailCompare" runat="server" ControlToCompare="RequestEmailTextBox" ControlToValidate="ConfirmEmailTextBox" Display="Dynamic" ErrorMessage="The Confirm E-mail must match the E-mail entry." ValidationGroup="CreateNewUserWizard"></asp:CompareValidator>  
63:                            </td>  
64:                          </tr>  
65:                         <tr>  
66:                            <td colspan="2" style="text-align:left">  
67:                               <asp:CustomValidator ID="EmailCustomValidator" runat="server" ControlToValidate="RequestEmailTextBox" ErrorMessage="The e-mail address that you entered is already in use. Please enter a different e-mail address." ToolTip="The e-mail address that you entered is already in use. Please enter a different e-mail address." OnServerValidate="EmailNotInUseValidator_ServerValidate" Display="Dynamic" EnableViewState="False"></asp:CustomValidator>  
68:                            </td>  
69:                         </tr>  
70:                         <tr>  
71:                             <td colspan="2"><asp:Label ID="Label2" runat="server" Font-Size="XX-Small" Text="* Your e-mail address will only be used within the Quiznet site. We do not sell or rent e-mail addresses to anyone outside the Quiznet site" /></td>  
72:                         </tr>  
73:                      </table>  
74:                   </td>  
75:                </tr>  
76:             </table>  
77:          </asp:WizardStep>  
78:           
79:          <asp:WizardStep ID="WizardStep2" runat="server" AllowReturn="False" Title="Confirmation Email Sent" StepType="Complete" >  
80:             <table width="100%">  
81:             <tr>  
82:                 <td colspan="2"><asp:Label ID="Label3" runat="server" Font-Bold="True" Font-Size="X-Small">An email has been sent to you with instructions for completing the request for your new user account.</asp:Label></td>  
83:             </tr>  
84:             <tr><td></td></tr>  
85:             <tr>  
86:                 <td colspan="2"><asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Size="X-Small">Please follow the instructions of the email to get access to Quiznet Online</asp:Label></td>  
87:             </tr>  
88:             </table>  
89:          </asp:WizardStep>  
90:           
91:          <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" Title="Confirm Creation of Your User Account" OnActivate="ProfilePage_Activate" >  
92:             <ContentTemplate>  
93:                <table border="0" width="100%">  
94:                   <tr>  
95:                      <td align="center" colspan="2" class="sectionHeader">  
96:                         Sign up for your new user account  
97:                      </td>  
98:                   </tr>  
99:                   <tr id="UserNameRow" runat="server" visible="false">  
100:                      <td></td>  
101:                      <td>  
102:                         <asp:TextBox ID="UserName" runat="server"></asp:TextBox>  
103:                      </td>  
104:                   </tr>  
105:                   <tr align="left">  
106:                      <td width="30%">  
107:                         <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>  
108:                      </td>  
109:                      <td width="70%">  
110:                         <asp:TextBox ID="Email" runat="server" Width="50%" MaxLength="256" ReadOnly="true" AutoCompleteType="Email"></asp:TextBox>  
111:                      </td>  
112:                   </tr>  
113:                   <tr align="left">  
114:                      <td>  
115:                         <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>  
116:                      </td>  
117:                      <td>  
118:                         <asp:TextBox  ID="Password" runat="server" TextMode="Password" Width="50%" MaxLength="256" EnableViewState="true"/>  
119:                         <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="CreateNewUserWizard">*</asp:RequiredFieldValidator>  
120:                      </td>  
121:                   </tr>  
122:                   <tr align="left">  
123:                      <td>  
124:                         <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label></td>  
125:                      <td>  
126:                         <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" Width="50%" MaxLength="256" EnableViewState="true"/>  
127:                         <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword" ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required." ValidationGroup="CreateNewUserWizard">*</asp:RequiredFieldValidator>  
128:                      </td>  
129:                   </tr>  
130:                   <tr align="left">  
131:                      <td colspan="2" style="text-align:left">  
132:                         <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match." ValidationGroup="CreateNewUserWizard"></asp:CompareValidator>  
133:                      </td>  
134:                   </tr>  
135:                   <tr><td colspan="2"><hr /></td></tr>  
136:                   <tr align="left">  
137:                     <td><asp:Label runat="server" ID="lblNickName" Text="Your Name:"></asp:Label> </td>  
138:                     <td><asp:TextBox runat="server" ID="txtNickName" AutoCompleteType="DisplayName"></asp:TextBox><asp:Label ID="Label4" runat="server" Font-Size="XX-Small" Text="Note: Names are displayed publically for top scores"></asp:Label>                    
139:                         <asp:RequiredFieldValidator ID="NickNameRequired" runat="server" ControlToValidate="txtNickName" ErrorMessage="Required" ToolTip="Enter a name identifying yourserlf e.g. your first name" ValidationGroup="CreateNewUserWizard">*</asp:RequiredFieldValidator>  
140:                     </td>  
141:                   </tr>                                    
142:                   <tr align="left">  
143:                     <td colspan="2"><ucAddressInput:Control runat="server" ID="ucAddressInput" /> </td>  
144:                   </tr>  
145:                   <tr>  
146:                     <td colspan="2"><asp:Label runat="server" ID="Label3" Text="Receive News Letter"></asp:Label> <asp:CheckBox runat="server" ID="chkGetNewsletter"></asp:CheckBox></td>  
147:                   </tr>                    
148:                   <tr>  
149:                      <td colspan="2" style="text-align:left; color:red">  
150:                         <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>  
151: There is a limit of 150 source code lines in the evaluation version
152: There is a limit of 150 source code lines in the evaluation version
153: There is a limit of 150 source code lines in the evaluation version
154: There is a limit of 150 source code lines in the evaluation version
155: There is a limit of 150 source code lines in the evaluation version
156: There is a limit of 150 source code lines in the evaluation version
157: There is a limit of 150 source code lines in the evaluation version
158: There is a limit of 150 source code lines in the evaluation version
159: There is a limit of 150 source code lines in the evaluation version
160: There is a limit of 150 source code lines in the evaluation version
161: There is a limit of 150 source code lines in the evaluation version
162: There is a limit of 150 source code lines in the evaluation version
163: There is a limit of 150 source code lines in the evaluation version
164: There is a limit of 150 source code lines in the evaluation version
165: There is a limit of 150 source code lines in the evaluation version
166: There is a limit of 150 source code lines in the evaluation version
167: There is a limit of 150 source code lines in the evaluation version
168: There is a limit of 150 source code lines in the evaluation version
169: There is a limit of 150 source code lines in the evaluation version
170: There is a limit of 150 source code lines in the evaluation version
171: There is a limit of 150 source code lines in the evaluation version
172: There is a limit of 150 source code lines in the evaluation version
173: There is a limit of 150 source code lines in the evaluation version
174: There is a limit of 150 source code lines in the evaluation version
175: There is a limit of 150 source code lines in the evaluation version
176: There is a limit of 150 source code lines in the evaluation version
177: There is a limit of 150 source code lines in the evaluation version
178: There is a limit of 150 source code lines in the evaluation version
179: There is a limit of 150 source code lines in the evaluation version
180: There is a limit of 150 source code lines in the evaluation version

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.