Error Message CS0117: 'System.Web.UI.WebControls.DropDownList' does not contain a definition for 'Text'

I get this Error Message:  ( CS0117: 'System.Web.UI.WebControls.DropDownList' does not contain a definition for 'Text' ) from my Register.aspx when I try to open it. I've added a DropDownList to the Register.aspx page and it throws me this (CS0117 Error message). Could use some help on this. Don't know where and how to correct this problem. If I remove the Dropdownlist and recompile the CustomersDB.cs file, and run the Register.aspx page again then it opens up. But as soon as I add the DropdownList I receive this (Error CS0117).

Would appreciate any help. Thank You. TIA.
Here is the code for the Register.aspx file and also the CustomersDB.cs file


<%@ Page Language="C#" Trace="false" Debug="true" ErrorPage="ErrorPage.aspx" %>
<%@ Register TagPrefix="ASPNETCommerce" TagName="Header" Src="_Header.ascx" %>
<%@ Register TagPrefix="ASPNETCommerce" TagName="Menu" Src="_Menu.ascx" %>
<script runat="server">
//*******************************************************
//
// The RegisterBtn_Click event handler is used on this page to
// add a new user into the ASP.NET Commerce Starter Kit Customers database.
//
// The event handler then migrates any items stored in the user's
// temporary (non-persistent) shopping cart to their
// permanent customer account, adds a cookie to the client
// (so that we can personalize the home page's welcome
// message), and then redirects the browser back to the
// originating page.
//
//*******************************************************








void RegisterBtn_Click(Object sender, ImageClickEventArgs e){

// Only attempt a login if all form fields on the page are valid
if (Page.IsValid == true) {

// Store off old temporary shopping cart ID
ASPNET.StarterKit.Commerce.ShoppingCartDB shoppingCart = new ASPNET.StarterKit.Commerce.ShoppingCartDB();
String tempCartId = shoppingCart.GetShoppingCartId();


// Add New Customer to CustomerDB database

ASPNET.StarterKit.Commerce.CustomersDB accountSystem = new ASPNET.StarterKit.Commerce.CustomersDB();


String customerId = accountSystem.AddCustomer(Server.HtmlEncode(Name.Text), Email.Text, ASPNET.StarterKit.Commerce.Security.Encrypt(Password.Text),
B_FirstName.Text,
B_LastName.Text,
B_CompanyName.Text,
B_Title.Text,
B_Address1.Text,
B_Address2.Text,
B_City.Text,
B_State.Text,
B_PostalCode.Text,
B_Country.Text,
B_HomePhone.Text,
B_MobilePhone.Text,
B_OfficePhone.Text,
B_Fax.Text,
B_CCName.Text,
B_CCNumber.Text,
B_CCType.Text,
S_FirstName.Text,
S_LastName.Text,
S_CompanyName.Text,
S_Title.Text,
S_Address1.Text,
S_Address2.Text,
S_City.Text,
S_State.Text,
S_PostalCode.Text,
S_Country.Text,
S_HomePhone.Text,
S_MobilePhone.Text,
S_OfficePhone.Text,
S_Fax.Text);






if (customerId != "") {

// Set the user's authentication name to the customerId
FormsAuthentication.SetAuthCookie(customerId, false);

// Migrate any existing shopping cart items into the permanent shopping cart
shoppingCart.MigrateCart(tempCartId, customerId);

// Store the user's fullname in a cookie for personalization purposes
Response.Cookies["ASPNETCommerce_FullName"].Value = Server.HtmlEncode(Name.Text);

// Redirect browser back to shopping cart page
Response.Redirect("ShoppingCart.aspx");
}
else {
MyError.Text = "Registration failed:&nbsp; That email address is already registered.<br><img align=left height=1 width=92 src=images/1x1.gif>";
}
}
}





void refresh_TheCombos() {

// Obtain CreditCard Types and databind to an asp:dropdown control
ASPNET.StarterKit.Commerce.MerchantsDB Merchants = new ASPNET.StarterKit.Commerce.MerchantsDB();
Session["obj_Merchants"]=Merchants;

//Refresh the combo during postback
B_CCType.DataSource = Merchants.GetMerchants();
B_CCType.DataTextField = "MerchantName";
B_CCType.DataValueField = "MerchantName";
B_CCType.DataBind();





//cbo_Users.Items.Add(New ListItem("-------------", "xxx"))
//cbo_Users.Items.Add(New ListItem("Active Users", "0"))
//cbo_Users.Items.Add(New ListItem("Deleted Users", "xxxx"))
//Dim i As Integer
//Dim li As ListItem
//For Each li In cbo_Users.Items
// If li.value = "0" Then
// li.Selected = True
// End If
//Next

}
</script>
<html>
<head>
<link href="ASPNETCommerce.css" type="text/css" rel="stylesheet" />
</head>
<body bottommargin="0" leftmargin="0" background="images/sitebkgrd.gif" topmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td colspan="2">
<ASPNETCommerce:Header id="Header1" runat="server"></ASPNETCommerce:Header>
</td>
</tr>
<tr>
<td valign="top">
<ASPNETCommerce:Menu id="Menu1" runat="server"></ASPNETCommerce:Menu>
<img height="1" src="images/1x1.gif" width="145" />
</td>
<td valign="top" nowrap="nowrap" align="left" width="100%">
<table style="WIDTH: 100%; HEIGHT: 1207px" cellspacing="0" cellpadding="0" width="100%" align="left" border="0">
<tbody>
<tr valign="top">
<td nowrap="nowrap">
<br />
<form runat="server">
<img height="1" src="images/1x1.gif" width="24" align="left" />
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td class="ContentHead">
<img height="32" src="images/1x1.gif" width="60" align="left" />Create a New Account
<br />
</td>
</tr>
</tbody>
</table>
<img height="1" src="images/1x1.gif" width="92" align="left" />
<table style="WIDTH: 1200px; HEIGHT: 871px" cellspacing="0" cellpadding="0" width="1355" border="0">
<tbody>
<tr valign="top">
<td width="550">
<p>
<br />
<br />
<table style="WIDTH: 1250px; HEIGHT: 761px" width="1250" align="center width=" 100%?>
<tbody>
<tr valign="center">
<td class="TitleBar1" align="left" width="100%" bgcolor="#0000c0" colspan="4">
<span class="NormalBold"><font color="white">General Information: Required</font></span>
</td>
</tr>
<tr valign="center">
<td align="left" width="100%" colspan="4">
<hr />
</td>
</tr>
<tr valign="center">
<td nowrap="nowrap" align="right" width="25%">
<span class="NormalBold">Full Name</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="Name" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ControlToValidate="Name" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="'Name' must not be left blank."></asp:RequiredFieldValidator>
</td>
<td align="right">
<span class="NormalBold">Email</span>
</td>
<td align="left">
<asp:TextBox id="Email" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ControlToValidate="Email" Display="Dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="Must use a valid email address." ValidationExpression="[\w\.-]+(\+[\w-]*)?@([\w-]+\.)+[\w-]+"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ControlToValidate="Email" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="'Email' must not be left blank."></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td align="right">
<span class="NormalBold">Password</span>
</td>
<td>
<asp:TextBox id="Password" runat="server" Width="185px" size="25" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator3" runat="server" ControlToValidate="Password" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="'Password' must not be left blank."></asp:RequiredFieldValidator>
</td>
<td align="right">
<span class="NormalBold">Confirm Password</span>
</td>
<td align="left">
<asp:TextBox id="ConfirmPassword" runat="server" Width="185px" size="25" TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator4" runat="server" ControlToValidate="ConfirmPassword" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="'Confirm' must not be left blank."></asp:RequiredFieldValidator>
<asp:CompareValidator id="CompareValidator1" runat="server" ControlToValidate="ConfirmPassword" Display="Dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="Password fields do not match." ControlToCompare="Password"></asp:CompareValidator>
</td>
</tr>
<tr valign="center">
<td align="left" width="100%" colspan="4">
<hr />
</td>
</tr>
<tr>
<td align="left" width="100%" bgcolor="#0000c0" colspan="4">
<span class="NormalBold"><font color="white">Billing Information: Required</font></span></td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr valign="center">
<td align="left" width="100%" colspan="4">
<hr />
</td>
</tr>
<tr>
<td align="right">
<span class="NormalBold">First Name</span>&nbsp;</td>
<td>
<asp:TextBox id="B_FirstName" runat="server" Width="185px"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator5" runat="server" ControlToValidate="B_FirstName" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
<td align="right" width="25%">
<span class="NormalBold">Last Name:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="B_LastName" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator6" runat="server" ControlToValidate="B_LastName" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr valign="center">
<td nowrap="nowrap" align="right" width="25%">
<span class="NormalBold">Company Name: </span></td>
<td align="left" width="25%">
<asp:TextBox id="B_CompanyName" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
<td align="right" width="25%">
<span class="NormalBold">Title:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="B_Title" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Address 1: </span></td>
<td align="left" colspan="3">
<asp:TextBox id="B_Address1" runat="server" size="64"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator7" runat="server" ControlToValidate="B_Address1" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Address 2:</span>
</td>
<td align="left" colspan="3">
<asp:TextBox id="B_Address2" runat="server" size="64"></asp:TextBox>
</td>
</tr>
<tr valign="center">
<td nowrap="nowrap" align="right" width="25%">
<span class="NormalBold">City: </span></td>
<td align="left">
<asp:TextBox id="B_City" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator8" runat="server" ControlToValidate="B_City" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
<td valign="center" align="middle" colspan="2">
<span class="NormalBold">State:</span>
<asp:TextBox id="B_State" runat="server" size="4"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator9" runat="server" ControlToValidate="B_State" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
<span class="NormalBold">Zip:</span>
<asp:TextBox id="B_PostalCode" runat="server" size="6"></asp:TextBox>
<asp:RequiredFieldValidator id="Requiredfieldvalidator10" runat="server" ControlToValidate="B_PostalCode" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
<span class="NormalBold">Country:</span>
<asp:TextBox id="B_Country" runat="server" Width="100px" size="6"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator11" runat="server" ControlToValidate="B_Country" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Home Phone: </span></td>
<td align="left" width="25%">
<asp:TextBox id="B_HomePhone" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator12" runat="server" ControlToValidate="B_HomePhone" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
<td align="right" width="25%">
<span class="NormalBold">Mobile Phone:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="B_MobilePhone" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Office Phone: </span></td>
<td align="left" width="25%">
<asp:TextBox id="B_OfficePhone" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
<td align="right" width="25%">
<span class="NormalBold">Fax:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="B_Fax" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
</tr>
<tr valign="center">
<td align="left" width="100%" colspan="4">
<hr />
</td>
</tr>
<tr valign="center">
<td class="titlebar1" align="left" width="100%" bgcolor="#0000c0" colspan="4">
<span class="NormalBold"><font color="white">Credit Card Information: Required</font></span>
</td>
</tr>
<tr valign="center">
<td align="left" width="100%" colspan="4">
<hr />
</td>
</tr>
<tr valign="center">
<td align="middle" width="100%" colspan="4">
<span class="NormalBold"><font color="red">Billing address above most match this
cards information.</font>
</span></td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Name on Card:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="B_CCName" runat="server" Width="175px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator13" runat="server" ControlToValidate="B_CCName" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
<td align="right" width="25%">
<span class="NormalBold">Card #: </span></td>
<td align="left" width="25%">
<asp:TextBox id="B_CCNumber" runat="server" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator24" runat="server" ControlToValidate="B_CCNumber" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr valign="center">
<td nowrap="nowrap" align="left" width="25%" colspan="3">
<span class="NormalBold">Card Type:</span>
<asp:DropDownList id="B_CCType" runat="server" Width="140px"></asp:DropDownList>
<asp:RequiredFieldValidator id="RequiredFieldValidator14" runat="server" ControlToValidate="B_CCType" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="'Credit Card Type' must not be left blank."></asp:RequiredFieldValidator>
<span class="NormalBold">Exp. Date:</span>
<asp:DropDownList id="B_CCMonth" runat="server">
<asp:ListItem Value="01">01</asp:ListItem>
<asp:ListItem Value="02">02</asp:ListItem>
<asp:ListItem Value="03">03</asp:ListItem>
<asp:ListItem Value="04">04</asp:ListItem>
<asp:ListItem Value="05">05</asp:ListItem>
<asp:ListItem Value="06">06</asp:ListItem>
<asp:ListItem Value="07">07</asp:ListItem>
<asp:ListItem Value="08">08</asp:ListItem>
<asp:ListItem Value="09">09</asp:ListItem>
<asp:ListItem Value="10">10</asp:ListItem>
<asp:ListItem Value="11">11</asp:ListItem>
<asp:ListItem Value="12">12</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator id="Requiredfieldvalidator15" runat="server" ControlToValidate="B_CCMonth" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="'Credit Card Month' must not be left blank."></asp:RequiredFieldValidator>
<asp:DropDownList id="B_CCYear" runat="server">
<asp:ListItem Value="2003">2003</asp:ListItem>
<asp:ListItem Value="2004">2004</asp:ListItem>
<asp:ListItem Value="2005">2005</asp:ListItem>
<asp:ListItem Value="2006">2006</asp:ListItem>
<asp:ListItem Value="2007">2007</asp:ListItem>
<asp:ListItem Value="2008">2008</asp:ListItem>
<asp:ListItem Value="2009">2009</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator id="Requiredfieldvalidator16" runat="server" ControlToValidate="B_CCYear" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="'Credit Card Year' must not be left blank."></asp:RequiredFieldValidator>
</td>
<td align="left" width="25%">
<span class="NormalBold">3 or 4 Digit Code: </span>
<asp:TextBox id="B_CCCode" runat="server" Width="68px" size="5"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator17" runat="server" ControlToValidate="B_CCCode" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr valign="center">
<td align="left" width="100%" colspan="4">
<hr />
</td>
</tr>
<tr valign="center">
<td class="titlebar1" align="middle" width="100%" bgcolor="#0000c0" colspan="4">
<font color="white" size="6">Payments Go To...</font></td>
</tr>
<tr valign="center">
<td align="middle" width="100%" bgcolor="#0000c0" colspan="4" height="20">
<p>
<hr />
<font color="white" size="5">Enter the address where payments should be sent,
and exactly who checks should be payable to.</font>

</p>

</td>
</tr>
<tr valign="center">
<td align="middle" width="100%" bgcolor="#0000c0" colspan="4" height="20">
<p>
<hr />
<font color="white" size="5">Physical address works better than P.O. Box if
possible.</font>

</p>

</td>
</tr>
<tr valign="center">
<td align="left" width="100%" colspan="4">
<hr />
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">First Name: </span></td>
<td align="left" width="25%">
<asp:TextBox id="S_FirstName" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator18" runat="server" ControlToValidate="S_FirstName" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
<td align="right" width="25%">
<span class="NormalBold">Last Name:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="S_LastName" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator19" runat="server" ControlToValidate="S_LastName" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr valign="center">
<td nowrap="nowrap" align="right" width="25%">
<span class="NormalBold">Company Name: </span></td>
<td align="left" width="25%">
<asp:TextBox id="S_CompanyName" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
<td align="right" width="25%">
<span class="NormalBold">Title:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="S_Title" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Address 1: </span></td>
<td align="left" colspan="3">
<asp:TextBox id="S_Address1" runat="server" size="64"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator20" runat="server" ControlToValidate="S_Address1" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Address 2:</span>
</td>
<td align="left" colspan="3">
<asp:TextBox id="S_Address2" runat="server" size="64"></asp:TextBox>
</td>
</tr>
<tr valign="center">
<td nowrap="nowrap" align="right" width="25%">
<span class="NormalBold">City: </span></td>
<td align="left">
<asp:TextBox id="S_City" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator21" runat="server" ControlToValidate="S_City" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
<td valign="center" align="middle" colspan="2">
<span class="NormalBold">State:</span>
<asp:TextBox id="S_State" runat="server" size="4"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator22" runat="server" ControlToValidate="S_State" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
<span class="NormalBold">Zip:</span>
<asp:TextBox id="S_PostalCode" runat="server" size="6"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator23" runat="server" ControlToValidate="S_PostalCode" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
<span class="NormalBold">Country:</span>
<asp:TextBox id="S_Country" runat="server" Width="100px" size="6"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator25" runat="server" ControlToValidate="S_Country" Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Home Phone: </span></td>
<td align="left" width="25%">
<asp:TextBox id="S_HomePhone" runat="server" Width="185px" size="25"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator26" runat="server" ControlToValidate="S_HomePhone" Display="dynamic" Font-Name="verdana" Font-Size="9pt" ErrorMessage="*"></asp:RequiredFieldValidator>
</td>
<td align="right" width="25%">
<span class="NormalBold">Mobile Phone:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="S_MobilePhone" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
</tr>
<tr valign="center">
<td align="right" width="25%">
<span class="NormalBold">Office Phone: </span></td>
<td align="left" width="25%">
<asp:TextBox id="S_OfficePhone" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
<td align="right" width="25%">
<span class="NormalBold">Fax:</span>
</td>
<td align="left" width="25%">
<asp:TextBox id="S_Fax" runat="server" Width="185px" size="25"></asp:TextBox>
</td>
</tr>
<tr valign="center">
<td align="middle" width="100%" colspan="4">
<hr />
</td>
</tr>
<tr>
<td align="middle" width="100%" bgcolor="#0000c0" colspan="4">
.</td>
</tr>
</tbody>
</table>
</p>
<p>
<asp:Label id="MyError" runat="Server" enableviewstate="false" cssclass="ErrorText"></asp:Label>
</p>
<p align="left">
<asp:ImageButton id="RegisterBtn" onclick="RegisterBtn_Click" runat="server" Width="240px" Height="52px" ImageUrl="images/submit.gif"></asp:ImageButton>
</p>
</td>
</tr>
</tbody>
</table>
</form>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>



CustomersDB.cs file



using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;

using System.Net;
using System.Net.Sockets;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.Util;
using System.Collections;
using System.Text;
using System.IO;
using System.Drawing;
using System.Security.Cryptography;
using System.Runtime.Remoting;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Reflection;
using System.Diagnostics;
using System.Threading;

namespace ASPNET.StarterKit.Commerce {
//*******************************************************
//
// CustomerDetails Class
//
// A simple data class that encapsulates details about
// a particular customer inside the Commerce Customer
// database.
//
//*******************************************************

public class CustomerDetails {
public String FullName="";
public String Email="";
public String Password="";
public String B_FirstName="";
public String B_LastName="";
public String B_CompanyName="";
public String B_Title="";
public String B_Address1="";
public String B_Address2="";
public String B_City="";
public String B_State="";
public String B_PostalCode="";
public String B_Country="";
public String B_HomePhone="";
public String B_MobilePhone="";
public String B_OfficePhone="";
public String B_Fax="";
public String B_CCName="";
public String B_CCNumber="";
public String B_CCType="Credit Card";
public String S_FirstName="";
public String S_LastName="";
public String S_CompanyName="";
public String S_Title="";
public String S_Address1="";
public String S_Address2="";
public String S_City="";
public String S_State="";
public String S_PostalCode="";
public String S_Country="";
public String S_HomePhone="";
public String S_MobilePhone="";
public String S_OfficePhone="";
public String S_Fax="";
}
//*******************************************************
//
// CustomersDB Class
//
// Business/Data Logic Class that encapsulates all data
// logic necessary to add/login/query customers within
// the Commerce Customer database.
//
//*******************************************************
public class CustomersDB {



//*******************************************************
//
// CustomersDB.GetCustomerDetails() Method <a name="GetCustomerDetails"></a>
//
// The GetCustomerDetails method returns a CustomerDetails
// struct that contains information about a specific
// customer (name, email, password, etc).
//
// Other relevant sources:
// + CustomerDetail Stored Procedure
//
//*******************************************************
public CustomerDetails GetCustomerDetails(String customerID)
{
// Create Instance of Connection and Command Object
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
SqlCommand myCommand = new SqlCommand("CMRC_CustomerDetail", myConnection);
// Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure;
// Add Parameters to SPROC
SqlParameter parameterCustomerID = new SqlParameter("@CustomerID", SqlDbType.Int, 4);
parameterCustomerID.Value = Int32.Parse(customerID);
myCommand.Parameters.Add(parameterCustomerID);
SqlParameter parameterFullName = new SqlParameter("@FullName", SqlDbType.NVarChar, 50);
parameterFullName.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterFullName);
SqlParameter parameterEmail = new SqlParameter("@Email", SqlDbType.NVarChar, 50);
parameterEmail.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterEmail);
SqlParameter parameterPassword = new SqlParameter("@Password", SqlDbType.NVarChar, 50);
parameterPassword.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterPassword);
SqlParameter parameterB_FirstName = new SqlParameter("@B_FirstName", SqlDbType.NVarChar, 50);
parameterB_FirstName.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_FirstName);
SqlParameter parameterB_LastName = new SqlParameter("@B_LastName", SqlDbType.NVarChar, 50);
parameterB_LastName.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_LastName);
SqlParameter parameterB_CompanyName = new SqlParameter("@B_CompanyName", SqlDbType.NVarChar, 50);
parameterB_CompanyName.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_CompanyName);
SqlParameter parameterB_Title = new SqlParameter("@B_Title", SqlDbType.NVarChar, 50);
parameterB_Title.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_Title);
SqlParameter parameterB_Address1 = new SqlParameter("@B_Address1", SqlDbType.NVarChar, 255);
parameterB_Address1.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_Address1);
SqlParameter parameterB_Address2 = new SqlParameter("@B_Address2", SqlDbType.NVarChar, 255);
parameterB_Address2.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_Address2);
SqlParameter parameterB_City = new SqlParameter("@B_City", SqlDbType.NVarChar, 50);
parameterB_City.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_City);
SqlParameter parameterB_State = new SqlParameter("@B_State", SqlDbType.NVarChar, 50);
parameterB_State.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_State);
SqlParameter parameterB_PostalCode = new SqlParameter("@B_PostalCode", SqlDbType.NVarChar, 50);
parameterB_PostalCode.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_PostalCode);
SqlParameter parameterB_Country = new SqlParameter("@B_Country", SqlDbType.NVarChar, 50);
parameterB_Country.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_Country);
SqlParameter parameterB_HomePhone = new SqlParameter("@B_HomePhone", SqlDbType.NVarChar, 50);
parameterB_HomePhone.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_HomePhone);
SqlParameter parameterB_MobilePhone = new SqlParameter("@B_MobilePhone", SqlDbType.NVarChar, 50);
parameterB_MobilePhone.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_MobilePhone);
SqlParameter parameterB_OfficePhone = new SqlParameter("@B_OfficePhone", SqlDbType.NVarChar, 50);
parameterB_OfficePhone.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_OfficePhone);
SqlParameter parameterB_Fax = new SqlParameter("@B_Fax", SqlDbType.NVarChar, 50);
parameterB_Fax.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_Fax);
//Credit Card Information
SqlParameter parameterB_CCName = new SqlParameter("@B_CCName", SqlDbType.NVarChar, 50);
parameterB_CCName.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_CCName);
SqlParameter parameterB_CCNumber = new SqlParameter("@B_CCNumber", SqlDbType.NVarChar, 50);
parameterB_CCNumber.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_CCNumber);
SqlParameter parameterB_CCType = new SqlParameter("@B_CCType", SqlDbType.NVarChar, 50);
parameterB_CCType.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterB_CCType);
//Beginning of new Payments Go To or ShipTo fields
SqlParameter parameterS_FirstName = new SqlParameter("@S_FirstName", SqlDbType.NVarChar, 50);
parameterS_FirstName.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_FirstName);
SqlParameter parameterS_LastName = new SqlParameter("@S_LastName", SqlDbType.NVarChar, 50);
parameterS_LastName.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_LastName);
SqlParameter parameterS_CompanyName = new SqlParameter("@S_CompanyName", SqlDbType.NVarChar, 50);
parameterS_CompanyName.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_CompanyName);
SqlParameter parameterS_Title = new SqlParameter("@S_Title", SqlDbType.NVarChar, 50);
parameterS_Title.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_Title);
SqlParameter parameterS_Address1 = new SqlParameter("@S_Address1", SqlDbType.NVarChar, 255);
parameterS_Address1.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_Address1);
SqlParameter parameterS_Address2 = new SqlParameter("@S_Address2", SqlDbType.NVarChar, 255);
parameterS_Address2.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_Address2);
SqlParameter parameterS_City = new SqlParameter("@S_City", SqlDbType.NVarChar, 50);
parameterS_City.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_City);
SqlParameter parameterS_State = new SqlParameter("@S_State", SqlDbType.NVarChar, 50);
parameterS_State.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_State);
SqlParameter parameterS_PostalCode = new SqlParameter("@S_PostalCode", SqlDbType.NVarChar, 50);
parameterS_PostalCode.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_PostalCode);
SqlParameter parameterS_Country = new SqlParameter("@S_Country", SqlDbType.NVarChar, 50);
parameterS_Country.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_Country);
SqlParameter parameterS_HomePhone = new SqlParameter("@S_HomePhone", SqlDbType.NVarChar, 50);
parameterS_HomePhone.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_HomePhone);
SqlParameter parameterS_MobilePhone = new SqlParameter("@S_MobilePhone", SqlDbType.NVarChar, 50);
parameterS_MobilePhone.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_MobilePhone);
SqlParameter parameterS_OfficePhone = new SqlParameter("@S_OfficePhone", SqlDbType.NVarChar, 50);
parameterS_OfficePhone.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_OfficePhone);
SqlParameter parameterS_Fax = new SqlParameter("@S_Fax", SqlDbType.NVarChar, 50);
parameterS_Fax.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterS_Fax);
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
// Create CustomerDetails Struct
CustomerDetails myCustomerDetails = new CustomerDetails();
// Populate Struct using Output Params from SPROC
myCustomerDetails.FullName = (string)parameterFullName.Value;
myCustomerDetails.Password = (string)parameterPassword.Value;
myCustomerDetails.Email = (string)parameterEmail.Value;
myCustomerDetails.B_FirstName = (string)parameterB_FirstName.Value;
myCustomerDetails.B_LastName = (string)parameterB_LastName.Value;
myCustomerDetails.B_CompanyName = (string)parameterB_CompanyName.Value;
myCustomerDetails.B_Title = (string)parameterB_Title.Value;
myCustomerDetails.B_Address1 = (string)parameterB_Address1.Value;
myCustomerDetails.B_Address2 = (string)parameterB_Address2.Value;
myCustomerDetails.B_City = (string)parameterB_City.Value;
myCustomerDetails.B_State = (string)parameterB_State.Value;
myCustomerDetails.B_PostalCode = (string)parameterB_PostalCode.Value;
myCustomerDetails.B_Country = (string)parameterB_Country.Value;
myCustomerDetails.B_HomePhone = (string)parameterB_HomePhone.Value;
myCustomerDetails.B_MobilePhone = (string)parameterB_MobilePhone.Value;
myCustomerDetails.B_OfficePhone = (string)parameterB_OfficePhone.Value;
myCustomerDetails.B_Fax = (string)parameterB_Fax.Value;
myCustomerDetails.B_CCName = (string)parameterB_CCName.Value;
myCustomerDetails.B_CCNumber = (string)parameterB_CCNumber.Value;
myCustomerDetails.B_CCType = (string)parameterB_CCType.Value;
myCustomerDetails.S_FirstName = (string)parameterS_FirstName.Value;
myCustomerDetails.S_LastName = (string)parameterS_LastName.Value;
myCustomerDetails.S_CompanyName = (string)parameterS_CompanyName.Value;
myCustomerDetails.S_Title = (string)parameterS_Title.Value;
myCustomerDetails.S_Address1 = (string)parameterS_Address1.Value;
myCustomerDetails.S_Address2 = (string)parameterS_Address2.Value;
myCustomerDetails.S_City = (string)parameterS_City.Value;
myCustomerDetails.S_State = (string)parameterS_State.Value;
myCustomerDetails.S_PostalCode = (string)parameterS_PostalCode.Value;
myCustomerDetails.S_Country = (string)parameterS_Country.Value;
myCustomerDetails.S_HomePhone = (string)parameterS_HomePhone.Value;
myCustomerDetails.S_MobilePhone = (string)parameterS_MobilePhone.Value;
myCustomerDetails.S_OfficePhone = (string)parameterS_OfficePhone.Value;
myCustomerDetails.S_Fax = (string)parameterS_Fax.Value;

return myCustomerDetails;
}
//*******************************************************
//
// CustomersDB.AddCustomer() Method <a name="AddCustomer"></a>
//
// The AddCustomer method inserts a new customer record
// into the customers database. A unique "CustomerId"
// key is then returned from the method. This can be
// used later to place orders, track shopping carts,
// etc within the ecommerce system.
//
// Other relevant sources:
// + CustomerAdd Stored Procedure
//
//*******************************************************
public String AddCustomer(string fullName, string email, string password,
string b_firstname,
string b_lastname,
string b_companyname,
string b_title,
string b_address1,
string b_address2,
string b_city,
string b_state,
string b_postalcode,
string b_country,
string b_homephone,
string b_mobilephone,
string b_officephone,
string b_fax,
string b_ccname,
string b_ccnumber,
string b_cctype,
string s_firstname,
string s_lastname,
string s_companyname,
string s_title,
string s_address1,
string s_address2,
string s_city,
string s_state,
string s_postalcode,
string s_country,
string s_homephone,
string s_mobilephone,
string s_officephone,
string s_fax)
{
// Create Instance of Connection and Command Object
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
SqlCommand myCommand = new SqlCommand("CMRC_CustomerAdd", myConnection);
// Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure;
// Add Parameters to SPROC
SqlParameter parameterFullName = new SqlParameter("@FullName", SqlDbType.NVarChar, 50);
parameterFullName.Value = fullName;
myCommand.Parameters.Add(parameterFullName);
SqlParameter parameterEmail = new SqlParameter("@Email", SqlDbType.NVarChar, 50);
parameterEmail.Value = email;
myCommand.Parameters.Add(parameterEmail);
SqlParameter parameterPassword = new SqlParameter("@Password", SqlDbType.NVarChar, 50);
parameterPassword.Value = password;
myCommand.Parameters.Add(parameterPassword);
SqlParameter parameterB_FirstName = new SqlParameter("@B_FirstName", SqlDbType.NVarChar, 50);
parameterB_FirstName.Value = b_firstname;
myCommand.Parameters.Add(parameterB_FirstName);
SqlParameter parameterB_LastName = new SqlParameter("@B_LastName", SqlDbType.NVarChar, 50);
parameterB_LastName.Value = b_lastname;
myCommand.Parameters.Add(parameterB_LastName);
SqlParameter parameterB_CompanyName = new SqlParameter("@B_CompanyName", SqlDbType.NVarChar, 50);
parameterB_CompanyName.Value = b_companyname;
myCommand.Parameters.Add(parameterB_CompanyName);
SqlParameter parameterB_Title = new SqlParameter("@B_Title", SqlDbType.NVarChar, 50);
parameterB_Title.Value = b_title;
myCommand.Parameters.Add(parameterB_Title);
SqlParameter parameterB_Address1 = new SqlParameter("@B_Address1", SqlDbType.NVarChar, 255);
parameterB_Address1.Value = b_address1;
myCommand.Parameters.Add(parameterB_Address1);
SqlParameter parameterB_Address2 = new SqlParameter("@B_Address2", SqlDbType.NVarChar, 255);
parameterB_Address2.Value = b_address2;
myCommand.Parameters.Add(parameterB_Address2);
SqlParameter parameterB_City = new SqlParameter("@B_City", SqlDbType.NVarChar, 50);
parameterB_City.Value = b_city;
myCommand.Parameters.Add(parameterB_City);
SqlParameter parameterB_State = new SqlParameter("@B_State", SqlDbType.NVarChar, 50);
parameterB_State.Value = b_state;
myCommand.Parameters.Add(parameterB_State);
SqlParameter parameterB_PostalCode = new SqlParameter("@B_PostalCode", SqlDbType.NVarChar, 50);
parameterB_PostalCode.Value = b_postalcode;
myCommand.Parameters.Add(parameterB_PostalCode);
SqlParameter parameterB_Country = new SqlParameter("@B_Country", SqlDbType.NVarChar, 50);
parameterB_Country.Value = b_country;
myCommand.Parameters.Add(parameterB_Country);
SqlParameter parameterB_HomePhone = new SqlParameter("@B_HomePhone", SqlDbType.NVarChar, 50);
parameterB_HomePhone.Value = b_homephone;
myCommand.Parameters.Add(parameterB_HomePhone);
SqlParameter parameterB_MobilePhone = new SqlParameter("@B_MobilePhone", SqlDbType.NVarChar, 50);
parameterB_MobilePhone.Value = b_mobilephone;
myCommand.Parameters.Add(parameterB_MobilePhone);
SqlParameter parameterB_OfficePhone = new SqlParameter("@B_OfficePhone", SqlDbType.NVarChar, 50);
parameterB_OfficePhone.Value = b_officephone;
myCommand.Parameters.Add(parameterB_OfficePhone);
SqlParameter parameterB_Fax = new SqlParameter("@B_Fax", SqlDbType.NVarChar, 50);
parameterB_Fax.Value = b_fax;
myCommand.Parameters.Add(parameterB_Fax);
//Credit Card info
SqlParameter parameterB_CCName = new SqlParameter("@B_CCName", SqlDbType.NVarChar, 50);
parameterB_CCName.Value = b_ccname;
myCommand.Parameters.Add(parameterB_CCName);
SqlParameter parameterB_CCNumber = new SqlParameter("@B_CCNumber", SqlDbType.NVarChar, 50);
parameterB_CCNumber.Value = b_ccnumber;
myCommand.Parameters.Add(parameterB_CCNumber);
SqlParameter parameterB_CCType = new SqlParameter("@B_CCType", SqlDbType.NVarChar, 50);
parameterB_CCType.Value = b_cctype;
myCommand.Parameters.Add(parameterB_CCType);
//Beginning of new Payments Go To or ShipTo fields
SqlParameter parameterS_FirstName = new SqlParameter("@S_FirstName", SqlDbType.NVarChar, 50);
parameterS_FirstName.Value = s_firstname;
myCommand.Parameters.Add(parameterS_FirstName);
SqlParameter parameterS_LastName = new SqlParameter("@S_LastName", SqlDbType.NVarChar, 50);
parameterS_LastName.Value = s_lastname;
myCommand.Parameters.Add(parameterS_LastName);
SqlParameter parameterS_CompanyName = new SqlParameter("@S_CompanyName", SqlDbType.NVarChar, 50);
parameterS_CompanyName.Value = s_companyname;
myCommand.Parameters.Add(parameterS_CompanyName);
SqlParameter parameterS_Title = new SqlParameter("@S_Title", SqlDbType.NVarChar, 50);
parameterS_Title.Value = s_title;
myCommand.Parameters.Add(parameterS_Title);
SqlParameter parameterS_Address1 = new SqlParameter("@S_Address1", SqlDbType.NVarChar, 255);
parameterS_Address1.Value = s_address1;
myCommand.Parameters.Add(parameterS_Address1);
SqlParameter parameterS_Address2 = new SqlParameter("@S_Address2", SqlDbType.NVarChar, 255);
parameterS_Address2.Value = s_address2;
myCommand.Parameters.Add(parameterS_Address2);
SqlParameter parameterS_City = new SqlParameter("@S_City", SqlDbType.NVarChar, 50);
parameterS_City.Value = s_city;
myCommand.Parameters.Add(parameterS_City);
SqlParameter parameterS_State = new SqlParameter("@S_State", SqlDbType.NVarChar, 50);
parameterS_State.Value = s_state;
myCommand.Parameters.Add(parameterS_State);
SqlParameter parameterS_PostalCode = new SqlParameter("@S_PostalCode", SqlDbType.NVarChar, 50);
parameterS_PostalCode.Value = s_postalcode;
myCommand.Parameters.Add(parameterS_PostalCode);
SqlParameter parameterS_Country = new SqlParameter("@S_Country", SqlDbType.NVarChar, 50);
parameterS_Country.Value = s_country;
myCommand.Parameters.Add(parameterS_Country);
SqlParameter parameterS_HomePhone = new SqlParameter("@S_HomePhone", SqlDbType.NVarChar, 50);
parameterS_HomePhone.Value = s_homephone;
myCommand.Parameters.Add(parameterS_HomePhone);
SqlParameter parameterS_MobilePhone = new SqlParameter("@S_MobilePhone", SqlDbType.NVarChar, 50);
parameterS_MobilePhone.Value = s_mobilephone;
myCommand.Parameters.Add(parameterS_MobilePhone);
SqlParameter parameterS_OfficePhone = new SqlParameter("@S_OfficePhone", SqlDbType.NVarChar, 50);
parameterS_OfficePhone.Value = s_officephone;
myCommand.Parameters.Add(parameterS_OfficePhone);
SqlParameter parameterS_Fax = new SqlParameter("@S_Fax", SqlDbType.NVarChar, 50);
parameterS_Fax.Value = s_fax;
myCommand.Parameters.Add(parameterS_Fax);
SqlParameter parameterCustomerID = new SqlParameter("@CustomerID", SqlDbType.Int, 4);
parameterCustomerID.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterCustomerID);
try {
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
// Calculate the CustomerID using Output Param from SPROC
int customerId = (int)parameterCustomerID.Value;
return customerId.ToString();
}
catch {
return String.Empty;
}
}
//*******************************************************
//
// CustomersDB.Login() Method <a name="Login"></a>
//
// The Login method validates a email/password pair
// against credentials stored in the customers database.
// If the email/password pair is valid, the method returns
// the "CustomerId" number of the customer. Otherwise
// it will throw an exception.
//
// Other relevant sources:
// + CustomerLogin Stored Procedure
//
//*******************************************************
public String Login(string email, string password)
{
// Create Instance of Connection and Command Object
SqlConnection myConnection = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
SqlCommand myCommand = new SqlCommand("CMRC_CustomerLogin", myConnection);
// Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure;
// Add Parameters to SPROC
SqlParameter parameterEmail = new SqlParameter("@Email", SqlDbType.NVarChar, 50);
parameterEmail.Value = email;
myCommand.Parameters.Add(parameterEmail);
SqlParameter parameterPassword = new SqlParameter("@Password", SqlDbType.NVarChar, 50);
parameterPassword.Value = password;
myCommand.Parameters.Add(parameterPassword);
SqlParameter parameterCustomerID = new SqlParameter("@CustomerID", SqlDbType.Int, 4);
parameterCustomerID.Direction = ParameterDirection.Output;
myCommand.Parameters.Add(parameterCustomerID);
// Open the connection and execute the Command
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
int customerId = (int)(parameterCustomerID.Value);
if (customerId == 0) {
return null;
}
else {
return customerId.ToString();
}
}
}
}


0
asp
3/8/2004 8:09:17 PM
asp.net.commerce-starter-kit 1165 articles. 0 followers. Follow

0 Replies
873 Views

Similar Articles

[PageSpeed] 16

Reply:

Similar Artilces:

Compiler Error Message: BC30456: 'text' is not a member of 'System.Web.UI.WebControls.DropDownList'.
Hi everyone, This is my first post.  I have always found answers to my questions and have never need to ask one of my own, but I have been stuck on this all morning. Here is whats going on. I created an aspx form on my server running Windows 2000 Advanced server and everything works great.  I created the form using Web Matrix running .net version 1.1.  It is just a form that adds information to a mysql database.  I moved the form to the server which is also running 2000 Advanced Server to the wwwroot folder.  I installed the .net version 1.1.  When I try...

CS0117: 'System.Web.UI.WebControls.Calendar' does not contain a definition for 'SelectedValue'
am I missing some class info somewhere perhaps?Any ideas or suggestions would be appreciated!error being thrown here:Line 16:                   Calendar1.SelectedValue = ("DueDate"); here is my current code:<%@ Page EnableViewState="true" Language="C#" AutoEventWireup="true" Inherits="CommunityServer.Controls.CSThemePage" MasterPageFile="tasks.Master" %><%@ Import Namespace="CommunityServer.Components" %><%@ Register T...

Error Serializing Value 'System.Web.UI.WebCOntrols.TreeNode' of type 'System.Web.UI.WebCOntrols.TreeNode'
Hi, I am  getting the error stated in the subject when i am storing a TreeNode in a ViewState and then using it as follows if (ViewState["ProductCounty"]!=null) { TreeNode _productCountyNode = DataTree.FindNode(((TreeNode)ViewState["ProductCounty"]).ValuePath); _productCountyNode.Expand(); } what could be causing this error? Hi, I believe TreeNode isn't serializable in a way its required for objects which can be put to ViewState - as reference - (TreeNode implements IStateManager and is meant to work together with TreeView itself saving it...

'Text' is not a member of 'System.Web.UI.WebControls.DropDownList'
Ive got a problem here.I had a script that took user registration info from a form and added it to a database. I had a few issues with relpacing characters and someone gave my some advice on simplifing my script.  Now i am having loads of problems with it.First of all it is now throwing the error above'Text' is not a member of 'System.Web.UI.WebControls.DropDownList'Basically i have a dropdown box with counties in it, oh god this asp.net is killing meSorry code dump:<%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %>  <script language="...

Unable to cast object of type 'System.Web.UI.WebControls.FormView' to type 'System.Web.UI.WebControls.DropDownList'.
Hi,  I have a formview with a dropdownlist created dynamically. i want to determine whether the dropdownlist was clicked. the code is written in the FormView1_DataBound method. I get the following error in the line below that is in italics and underlined: Unable to cast object of type 'System.Web.UI.WebControls.FormView' to type 'System.Web.UI.WebControls.DropDownList'.   Here is my code: ddl_iFullname = New DropDownList ddl_iFullname.ID = "ddl_iFullname" ddl_iFullname.DataSource = ObjectDataSource3 ddl_iFullname.DataTextField = "fullname" ddl_iFullname.DataValueField = "...

Error: Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.ButtonField'
Hello, I am getting the following error during compiliation. Any suggestions to fix it. Thanks. Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.ButtonField' protected void gvEvents_RowCommand(Object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Select") { int index = Convert.ToInt32(e.CommandArgument); GridViewRow selectedRow = gvEvents.Rows[index]; string sID; ButtonField btn; if (selectedRow.RowType == DataControlRowType.DataRow) { sID = ((ButtonField)selectedRow.FindControl("ID")).DataTextFi...

'System.Web.UI.WebControls.Panel' does not contain a definition for 'drpData'
Hi i have the following problem: Compiler Error Message: CS0117: 'System.Web.UI.WebControls.Panel' does not contain a definition for 'drpData' Source Error: Line 59: strvBilled = filepath.ToString(); Line 60: strvPris = tbvPris.Text; Line 61: strvKategori = tbvKategori.drpData.SelectedItem.Value.ToString(); Line 62: strSQL = "INSERT INTO varelist (vNummer, vNavn, vBeskriv, vBilled, vPris, vKategori) Values ("; Line 63: strSQL += strvNummer + ", '"; It should come from this list: <asp:panel ID="tbvKategori" r...

'System.Web.UI.WebControls.TextBox' does not contain a definition for 'InnerHtml' and ...
Hi,I have the problems (the following is one of those) with the codes below.Error 4 'System.Web.UI.WebControls.TextBox' does not contain a definition for 'InnerHtml' and no extension method 'InnerHtml' accepting a first argument of type 'System.Web.UI.WebControls.TextBox' could be found (are you missing a using directive or an assembly reference?)  Here is the markup file of 'Start.aspx' <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Start.aspx.cs" Inherits="Newsite._Default" %...

'System.Web.UI.WebControls.Label' does not contain a definition for 'Invoke'
I am making an asyncronous call to a web service. When the callback happens and my delegate is called, I want to set a text value on a label on my page. In order to do this I need to use Label1.Invoke -- However, when I compile this I get an error'System.Web.UI.WebControls.Label' does not contain a definition for 'Invoke'I thought all controls should have an Invoke method on it.. I don't understand why I get this error? Any one experience the same thing or have any clue as to what is going on? // we must invoke to get back to the UI thread...this.Label1.Invoke(new La...

DataBinding: 'System.Web.UI.WebControls.DropDownList' does not contain a property with the name 'Value'.
i'm using gridview and i'm changing the GRIDVIEW data based on what i have selected in my dropdownlist<asp:DropDownList ID="ddlPageItems" runat="server" Font-Names="Verdana" Font-Size="11px"AutoPostBack="True" OnSelectedIndexChanged="ddlPageItems_SelectedIndexChanged"><asp:ListItem Text="All" Value="0"></asp:ListItem><asp:ListItem Text="ABGY" Value="5"></asp:ListItem><asp:ListItem Text="AFT" Value="10" Selected="True"&...

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

Error 17 Argument '2': cannot convert from 'System.Web.UI.WebControls.FontSize' to 'float'
Error 17 Argument '2': cannot convert from 'System.Web.UI.WebControls.FontSize' to 'float' Error 16 The best overloaded method match for 'System.Drawing.Font.Font(string, float, System.Drawing.FontStyle)' has some invalid arguments Code:chart.DrawString(Convert.ToString(barValue[i]), new Font("arial", FontSize.Small, FontStyle.Regular), TEXT_COLOR, (columnSpacing + CHART_LEFT_MARGIN), (BMP_HEIGHT - (CHART_BOTTOM_MARGIN - (currentBarHeight - BAR_LABEL_SPACE)))); Any solution? I would be grateful for any help. new Font("...

Error 1 The type 'System.Web.UI.WebControls.LinqDataSource' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\asse
Once I build project. I encounter this error. Does someone experience this error?Error    1    The type 'System.Web.UI.WebControls.LinqDataSource' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\3.6.0.0__31bf3856ad364e35\System.Web.Extensions.dll'    D:\Source Code\Linq_Lesson5\Default.aspx    1    1    D:\Source Code\Linq_Lesson5\  It appears tha...

Error 60 Operator '&' is not defined for types 'System.Web.UI.WebControls.TextBox' and 'String'.
The comment control is a textbox:<td align="right" style="width: 228px"><asp:TextBox ID="comment" runat="server" TextMode="multiLine" Rows="10" Columns="50" onkeyup="return ismaxlength(this)" Width="260px" Height="100px" Font-Overline="false" /></td> and I'm being told by VS (underlined in blue ) that the for the comment field: Error 60 Operator '&' is not defined for types 'System.Web.UI.WebControls.TextBox' and 'String...

Web resources about - Error Message CS0117: 'System.Web.UI.WebControls.DropDownList' does not contain a definition for 'Text' - asp.net.commerce-starter-kit

Resources last updated: 1/22/2016 10:54:44 PM