Pages

Monday, September 13, 2010

Registration Process of the Shopping Cart

This is the page where new members can join the website. Members must fill all the fields marked with the * and other fields are optional.  Invalid fields are displayed with a red asterix next to the control.


The successful signup of a member will redirect the member to the welcome page of the website.

Source Code of Asp.net for Signup:


//-------------------------------------------------------------------------------||
// Guest can signup. Source code of signup webpage            ||
//-------------------------------------------------------------------------------||

signup.aspx
<%@ Page Explicit="True" Language="VB" Debug="True" %> // Page Directive
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.sqlclient" %>
<%@ Import Namespace="System.Web.Mail" %>

<!--#include file="config.aspx" -->
<!--#include file="registervalidations.aspx" -->
<!--#include file="securetrans.aspx" -->


<html >
<head>
<title> Sign up</title>



<SCRIPT language=JavaScript
src="javascript.js"></SCRIPT>
<style type="text/css">
<!--
.borderTable {padding: 0px 0px 0px 0px;
border: 1px solid #cccccc;
}
.borderTable {padding: 0px 0px 0px 0px;
border: 1px solid #CCCCCC;
}
-->
</style>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style3 {color: #CC3300}
.style4 {color: #999999}
.style6 {color: #FF9900}
.style7 {
    color: #000000;
    font-size: 12px;
}
.style8 {color: #336699}
.style9 {color: #003366#336699}
.style11 {color: #FF6600}
-->
</style>
</head>

<body><form runat="server">
<table width="799" border="0" align="center" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="112" height="38" valign="top"><img src="imagenew/sg_logo.jpg" alt="Logo" width="112" height="38" /></td>
    <td width="586">&nbsp;</td>
      <td width="101" valign="bottom"><div align="right"><span class="address"><a href="index.aspx"><span class="style4"><span class="style6">Home</span></span></a><span class="style4">
          </span></span></div></td>
  </tr>
</table>
<br />
<table width="799" border="0" align="center" cellpadding="0" cellspacing="0" background="imagenew/already_have_id.jpg">
  <!--DWLayoutTable-->
  <tr>
      <td width="275" height="39" align="center" valign="middle" class="address"><span class="style8">Already
        a member</span><span class="style9">? <a href="login.aspx">Sign In</a>.</span>
      </td>
    <td width="105">&nbsp;</td>
    <td width="390" align="center" valign="middle"><asp:Label ID="lblmessege" runat="server" Font-Bold="true" ForeColor="#CC0000" /></td>
    <td width="29">&nbsp;</td>
  </tr>
</table>
<br />
<table width="799" border="0" align="center" cellpadding="0" cellspacing="0" background="imagenew/sml_already_have_id.jpg">
  <!--DWLayoutTable-->
  <tr>
    <td width="799" height="11"></td>
  </tr>
</table>
<table width="799" border="0" align="center" cellpadding="0" cellspacing="0" background="imagenew/sn_bk.jpg" class="border4">
  <!--DWLayoutTable-->
  <tr>
    <td width="210" height="14"><h1 class="style7"><span class="style8">Create
          Your</span> <span class="style3">User</span><span class="style8"> ID</span></h1></td>
    <td width="587"></td>
  </tr>
</table>
<table width="799" border="0" align="center" cellpadding="0" cellspacing="0" background="imagenew/sn_bk.jpg" class="border4">
  <!--DWLayoutTable-->
  <tr>
    <td width="8" height="3"></td>
    <td width="781"></td>
    <td width="8"></td>
  </tr>
  <tr>
    <td height="135"></td>
    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
     
      <tr>
        <td width="14" height="1"></td>
            <td width="165" rowspan="2" align="right" valign="middle"><span class="leftlink2"><span class="style3">*</span><span class="leftlink1">
              <label accesskey="P" for="pw">User ID :</label>
            </span></span></td>
            <td width="9"></td>
            <td width="315"></td>
            <td width="62"></td>
            <td width="96"></td>
            <td width="120"></td>
      </tr>
      <tr>
        <td height="20"></td>
        <td></td>
        <td colspan="3" rowspan="2" valign="top"><asp:TextBox ID="txtUserid" runat="server" Width="150" MaxLength="20" />                       
          <asp:requiredfieldvalidator id="chuserid" errormessege="userID cannot be blank" text="*" Font-Bold="true" Font-Size="12" controltovalidate="txtUserid" runat="server"></asp:requiredfieldvalidator>
          
              <br>

              <asp:RegularExpressionValidator id="nospace" ErrorMessage="no spaces please" text="* user id cannot contain spaces" ControlToValidate="txtuserid" ValidationExpression="\S*" runat="server"></asp:RegularExpressionValidator>        </td>
            <td>&nbsp;</td>
      </tr>

      <tr>
        <td height="14"></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
      <tr>
        <td height="12"></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>