Pages

Monday, September 13, 2010

Login Screen of the Shopping Cart

This is the page where registered members are required to log in to the site. Invalid  details will not allow the members to login to the site and invalid attempts will be displayed with an error message.

On the login of a member, a unique security code is generated for this session which will be used for the security reasons in shopping carts if the user intend to purchase anything online. The logged in user will be redirected to the homepage with the member details.

//---------------------------------------------------------------------||
// This is the code of loginpage of website              ||
//---------------------------------------------------------------------||



login.aspx
<%@ Page Explicit="True" Language="VB" Debug="True"  %> // Page Directive
<%@ Import Namespace="System.Data" %> //Database connection
<%@ Import Namespace="System.Data.sqlclient" %> //Creating Database connection
<!--#include file="config.aspx" -->
<!--#include file="securetrans.aspx" -->
<!--#include file="verify.aspx" -->
<Script Runat="Server">
Sub Page_Load( s As Object, e As EventArgs )
lblmessege.text=""
If Not isPostBack Then
if session("checklog")=true then
lblerror.text="You are not logged in to access the feature you requested"
lblerror.visible="true"
else
lblerror.visible="false"
end if
lblmessege.text=""
end if
End Sub
</Script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon"
      type="image/ico"
      href="favicon.ico">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title> Sign in</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />


<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">
<!--
.style2 {color: #336699}
-->
</style>
</head>

<body><form runat="server">
  <p>&nbsp;</p>
  <table width="798" border="0" align="center" cellpadding="0" cellspacing="0" background="imagenew/full_up_line.jpg">
  <!--DWLayoutTable-->
  <tr>
    <td width="798" height="45">&nbsp;</td>
    </tr>
</table>
<table width="798" border="0" align="center" cellpadding="0" cellspacing="0" class="border4">
  <!--DWLayoutTable-->
  <tr>
    <td width="9" height="332">&nbsp;</td>
    <td width="771" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
     
      <tr>
        <td width="96" height="24">&nbsp;</td>
            <td width="379" valign="top"><asp:Label ID="lblerror"  runat="server"  /></td>
        <td width="12">&nbsp;</td>
          <td width="284">&nbsp;</td>
          </tr>
      <tr>
        <td colspan="2" rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->