Online Store Development Project Guide
CIS 4250, Spring 2025
(Your Own Coding in Green)
A. ASP.net Introduction
1. Visual Studio 2019 IDE
2. ASP.net IDE
3. Web Form approach (MVC and Core)
4. Code behind
5. Web application architecture
i. Request .html
ii. Request server programs (.aspx, .php, .jsp, etc)
6. Web server (HTTP server) – Internet Information Service (IIS)
7. Computer language components: syntax, logic (semantics), compiler/interpreter,
and IDE
8. HTML form:
i. <form name= method=POS/GET action=>
ii. <input type=textbox name= ….>
iii. <input type=radio name- …>
iv. <select name= >
v. <option value= …>
vi. </select>
vii. <input type=button name= …>
viii. <input type=submit name=…>
ix. </form>
x. Server string = “url?formfield1=formfieldvalue1&
formfield2=formfieldvalue2&…”
xi. Default.aspx?tbCurrencyIn=1234&ddlCurrencyType=br& __VIEWSTATE=
9. Your homework:
i. Add one button web control to the Default.aspx.
ii. Create one click event for the new button to run some logic.
iii. Present the result in another Label control.
B. Online Store Design and Development
C. E-commerce HTML Template
1. www.themeforest.net
2. Search “ecommerce in HTML” (not Wordpress, Magento, Drupal, etc.)
D. Master Page (see demo video)
1. Download your e-commerce HTML template from themeforest.net.
2. Convert the HTML template to ASP.net master page.
E. Main Category
1. Create the online store Category table.
i. Relational data model (normalization): MainCategory table and SubCategory
table related by the MainCategoryID as the primiary key for the
MainCatebory table and the foreign key in the SubCategory table.
ii. Denormalize the tables: One table for all category levels with a surrogate key
and a pointer column to indicate the parent category of each category entry
in the table.
2. Create a category table with your own data field names and your own data (3 main
categories and 3 sub categories for each main category)
3. Populate the main category names in the master page.
i. Create a SQL Data Source for the OnlineStore database to store the database
connection string in the web.config file.
ii. Find the HTML code in the master page where you can customize to display
the main category (the <li>).
iii. Use the data-bound Repeater web control to generate the customized
content (main category names).
4. Create the dynamic URLs for the main category to sub category.
F. Sub Category
1. Create Category.aspx based on shop.html.
2. On the left column:
i. Populate sub category names and show the main category name in the
heading.
ii. Create the dynamic URLs for the sub category (querystring variables:
MainCategoryID, MainCategoryName, SubCategoryID, SubCategoryName).
3. Create the Product table with your own data. The data fields should include product
id, product number, product name, product description, price, featured, keywords,
description, maincategoryid, subcategoryid, etc.
4. On the right column:
i. When a main category is clicked from the Main Category popup, list featured
products for the main category. Show product ID, product number, product
name, and price.
ii. When a sub category on the left is clicked, populate all products for the sub
category on the right. Show product id, product number, product name, and
price.
iii. Dynamically display product image. (hint: using <%# Eval("ProductNo") %>.jpg)
iv. Fill lblProductList with either “Product List for ” + the name of the selected
sub category name” (when a sub category is selected).
5. Show a hyperlinked breadcrumb (main category > sub category) on the top (bonus).
G. ADO.net – Connection, Command, DataAdapter, Data Containers (DataReader and
DataSet)
(ADO.net: http://hwang.cisdept.cpp.edu/WebDev/ServerSideScripting.aspx?m=ASPNET-Data-Access)
H. Product Details
1. Create dynamic URLs (with a querystring variable: ProductID) for the products
shown in the Category.aspx to link to the ProductDetails.aspx.
2. In ProductDetails.aspx.vb, develop database script (ADO.net) to get the product info
from the Product table.
3. In ProductDetails.aspx, show product number, product name, product description,
and Price.
4. Add a data field Rating (integer) to the Product table.
5. (Bonus) Develop a For-Next loop to dynamically display the product rating. (Hint:
Using the For Next looping with the block: strRating = strRating + "<img
src='images/product-details/1star.jpg' width='15px' />").
I. Populate Main Category using data-bound DropDownList control
1. In Layout.master, add: <asp:DropDownListID="ddlMainCategory" runat="server"
DataSourceID="sqlDSMainCategory" DataValueField="CategoryName">
J. Main Category String Generated at Run Time
1. Add lblMainCategory to Layout.master.
2. Develop script to generate the main category in a string at run time and display the
string in lblMainCategory.Text.
K. Dynamic Tab content in ProductDetail.aspx
1. In ProductDetail.aspx under <div class="tab-pane fade" id="details"> add
<asp:Label ID="lblProductInfo" runat="server" Text="Label" ForeColor="White">
2. In ProductDetail.aspx, add: lblProductInfo.Text = drProduct.Item("ProductInfo")
L. Product Search
1. Types of search
i. One word search: very possibly the ProductID
a. If there is a match (Layout.master), you then redirect the request to
the ProductDetail.aspx.
b. If there is no match, you will redirect to the Category.aspx and match
the searchstring with ProductName and/or ProductDescription (using
LIKE statement), show the results in rpProductList, and display on the
lblProductList.Text "Search Result For: " plus the searchstring.
c. If not found for ia and ib, display on the lblProductList.Text "Search
Result For: " plus the searchstring plus “not found”.
ii. Multiple words (mutation):
a. Two words: A, B, AB (Select * From Product Where
ProductDescription Like … A or B or AB)
b. Three words: A, B, C, AB, BC, AC, ABC (Select * From Product Where
ProductDescription Like … A or B or C or AB or BC or AC or ABC)
c. A common practice is to develop a routine (For Next) to create the
SQL statement.
iii. Semantic search (full-text search): NLP, Machine Learning, etc.
M. Login and Logout
1. 3 different types of sessions
i. TCP/IP session
ii. Application server session (ASP.net runtime)
iii. Application session (Asp.net project)
2. State management (session management)
i. Get: using querystring in an predeveloped url
(serverprogram?qv1=v1&qv2=v2&…)
ii. Post: using HTML form (the browser will construct a url string like
serverprogram?qv1=v1&qv2=v2&…)
iii. Using server-side session variables (for security reason, this is the best.)
3. Create a Customer table with three data fields: CustomerID (int), Username (char,
10) and Password (char, 10). Add at least two customers to the table.
4. In Layout.master, add a Login hyperlink control, a Logout hyperlink control, and a
lable control to display customer username.
5. Create login.aspx with four web controls:
i. tbUsername for customer to enter email
ii. tbPassword for customer to enter password
iii. btnLogin to authenticate the customer
iv. lblMessage to show return message
6. Develop login script in Login.aspx.vb to authenticate customers.
i. If the customer is successfully authenticated,
a. create a session variable called Session(“UserName”) to store the
customer’s Username and
b. redirect the customer to Default.aspx.
ii. If the customer is unsuccessfully authenticated, show a message on
lblMessage: “Login failed.”
7. In Layout.master.vb, develop script in PageLoad to check if the Session(“Username”)
exists. If it does,
i. hide the Login hyperlink control,
ii. show the Logout hyperlink control, and
iii. display Session(“Username”) in lblCustomer.
8. In ProductDetail.aspx, check if Session(“Username”) is not null (the user has been
successfully authenticated). If not, show a 20% discount on the price.
9. In Category.aspx, check if the session variable is not null. If not, show a 20% discount
on the price. (hint: create a function to calculate the discount in Category.aspx.vb
and call it from the Category.aspx)
10. Create Logout.aspx for the Logout hyperlink control and develop script to logout.
(hint: erase the Session(“Username”) value)
i. hide Logout hyperlink control
ii. show the Login hyperlink control
iii. hide username (lblUsername control)
N. Using HTML tag at Design Time
1. In Layout.master, add: <li><a href="" id="hrefDestination" runat="server">
</a></li>
2. In Layout.master.vb, add: hrefCustomer.InnerText = Session("Email")
O. SEO: Dynamic Title and Meta Tags
1. In the PlaceHolder tag of the Head section of Category.aspx, add the following HTML
controls:
a. <meta id="metaDescription" runat="server" name="Description" />
b. <meta id="metaKeywords" runat="server" name="keywords" />
c. <title id="dynamicTitle" runat="server" />
2. Remove <title> and <meta description> from Layout.master
3. In the Page_Load event of Category.aspx.vb, add:
dynamicTitle.InnerHtml = Request.QueryString("SubCategoryName")
dynamicTitle.InnerHtml = Request.QueryString("MainCategoryName")
metaKeywords.Attributes.Item("content") = "keyword1, keyword2, keyword3, …"
metaDescription.Attributes.Item("content") = "Description…”
4. Populate the CategoryDescription and CategoryKeyword columns in the Category
table. For each Category.aspx run, dynamically fill the value of metaDescription and
metaKeywords from the two columns.
P. SEO: URL Rewrite
(http://www.allthefixes.com/10-url-rewriting-tips-and-tricks-for-urlrewrite-on-iis-7/)
1. For example: Replace “ /Category.aspx?MainCategoryID=…” by “/CategoryID”,
“ViewCart.aspx” by “…com/ViewCart”, etc.
2. Three approaches:
a. HTTP server: e.g., IIS 7 and up
b. Third-party add-in URL rewrite module to work with the HTTP server of the
application servers (ASP.net, PhP, etc.)
c. Application level: ASP.net URL rewrite
3. Under the <system.webServer> node in Web.config, add the following section:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
</modules>
<rewrite>
<rules>
<rule name="Rule 1">
<match url="Category-(.*)-(.*)" />
<action type="Rewrite"
url="Category.aspx?MainCategoryID={R:1}&MainCategoryName={R:2}"
appendQueryString="true" />
</rule>
<rule name="Rule 2" stopProcessing="true">
<match url="Product-(.*)" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="ProductDetails.aspx?ProductID={R:1}" />
</rule>
<rule name="Rule 3" enabled="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory"
negate="true" />
</conditions>
<action type="Rewrite" url="{R:1}.aspx" />
</rule>
</rules>
</rewrite>
</system.webServer>
4. In Layout.master, remove the extension .aspx for ViewCart, Login, Logout.
5. Testing
a. Click Login link.
b. In the URL box, try “Category-2-Desktop” and “Product-3”.
6. Implement this URL rewrite on your own online store (bonus for non-class online
store).
Q. Add to Cart
1. Create Cart table with the following data fields: CartNo (char,10), ProductNo
(char,10), ProductName (char,30), Price (numeric, 9,2), and Quantity (int).
2. Develop script for the Add to Cart button on the ProductDetail.aspx.
i. When a product is added to the cart, validate its data type (numeric) first
(hint: ASP.net validation controls), then determine if you need to either add
this product to the Cart or update the quantity if the same product already
exists. To add the product to the Cart, we need data items such as CartNo,
ProductNo, ProductName, Price, and Quantity. To update the product
quantity, we need CartNo, ProductNo, and Quantity.
a. Get CartNo by checking if the browser has a cookie called CartNo with
a cart number.
i. If not (this is the first product to be added to the Cart),
generate a random cart number and have the browser create
a cookie called CartNo and store the cart number.
ii. If yes (this is not the first product added to the Cart), ask the
browser to send over the cart number stored in the CartNo
cookie.
b. Get the price of the product from the Product table.
c. Get ProductNo, ProductName, and Quantity from the
ProductDetailx.aspx.
d. Add a Date/Time data field in the Cart table (optional for bonus).
e. Determine if the product already exists in the Cart.
i. If it already exists, update the quantity.
ii. If not, add this product as a new item to the Cart (including
optional date/time).
iii. Redirect to ViewCart.aspx.
R. Shopping Cart Note
S. View Cart with GridView
1. Change “cart.html” to “ViewCart1.aspx” in Layout.master.
i. Create ViewCart1.aspx.
ii. Add SqlDSCart1 to ViewCart1.aspx with the DELETE and UPDATE SQL
statement hard coded.
2. Develop script to view cart info via ViewCart2.aspx
i. get CartNo from the browser
ii. create the Select SQL statement for the cart.
iii. assign the SQL statement to the SqlDSCart1.
T. View Cart with ListView
1. Add “Cart 2” link for “ViewCart2.aspx” in Layout.master.
2. Create ViewCart32aspx.
3. Add a DataSource (sqlDSCart), a ListView (lvCart), and a DataPagter (datapager1) to
ViewCart2.aspx.
4. Develop script for ViewCart2.aspx to
i. add one table column to show extension for each product,
ii. update quantity of a product, and
iii. delete a product.
iv. develop script to empty all products in a cart.
5. Develop script to calculate the total amount of the cart and display it (the Select
statement).
6. Notes:
i. The ListView Control
a. LayoutTemplate:
i. The container in which all the headings and items will be
rendered.
ii. The Placeholder control with an ID property set to
itemPlaceholder. This control is never rendered to the
browser and only gets internally replaced with the contents of
the ItemTemplate.
b. ItemTemplate:
i. Used to render items from the data source.
ii. Uses data binding expression syntax with Eval method to
retrieve data from data source.
rd
c. The 3 -party Telerik UI control expands the functions.
d. ListView.OnItemCommand: binds an event handler subroutine to the
ListView's OnItemCommand event.
ii. The Pager Control
a. PagedControlID: indicate which data control to render data.
b. Characters Entities in HTML5 (e.g., « («))
c. DataPager.StartRowIndex: gets the index of the first record that is
displayed on a page of data.
U. Checkout Module Notes
• Shipping information: address1, address2, city, state, zipcode (first name, last name,
phone number)
• Data validation:
• Payment Information:
o Credit card: card type (radio button), credit card no (the first digit and the
number of digit; 1 or 4 text boxes), expiration date (month and year), CCV,
card holder,
o Billing address: checkbox for the same as the shipping address
• Routine to publish expiration year: get this year as the base, the loop a number
time to create the subsequent years
• Total payment: product cost (subtotal) + tax + shipping cost
• Shipping cost:
• Multiple items in one order:
• Shipping cost: from zipcode, and to zipcode, weight, dimensions, box size or type,
shipping method
• Shipping cost from the carriers:
• Approaches: API/Web services to the carrier, by yourself (tables from the carrier),
use the 3rd party ASP.net controls
• Fedex Online Shipping Rates Calculator
V. Send Confirmation Email
1. Create Email.aspx with the following web controls:
a. tbName for customer’s name
b. tbEmail for customer’s email
c. tbSubject for email subject
d. tbMessage for email message
e. btnSend to send the email
f. lblReturnMessage for the return message
2. Using Gmail email server:
a. Google may block sign in attempts from some apps or devices that do not use
modern security standards. Since these apps and devices are easier to break
into, blocking them helps keep your account safer.
b. Therefore, you have to enable Less Secure Sign-In (or Less secure app access)
in your google account.
c. After sign into google account, go to:
https://www.google.com/settings/security/lesssecureapps
3. Develop script to send email.
Dim sendConformationEmail As MailMessage = New MailMessage()
Dim smtpConformationEmail As SmtpClient = New SmtpClient()
Dim subjectConformtionEmail As String = "Thanks for the order!"
Dim credConformationEmail As System.Net.NetworkCredential = New
System.Net.NetworkCredential("your email", "")
' add email from the textbox
sendConformationEmail.[To].Add(tbEmail.Text)
' add email from the code
Dim cc As MailAddress = New MailAddress("your email ")
sendConformationEmail.CC.Add(cc)
sendConformationEmail.From = New MailAddress("your email ")
sendConformationEmail.Subject = tbSubject.Text
' Chr(13) - Carriage return; Chr(10) - Line feed
sendConformationEmail.Body = "Name : " + tbName.Text + Chr(13) + Chr(10) + Chr(13) +
Chr(10) + "E-Mail: " + tbEmail.Text + vbCrLf + vbCrLf + "Message: " + tbMessage.Text
sendConformationEmail.IsBodyHtml = True
smtpConformationEmail.Host = "smtp.gmail.com"
smtpConformationEmail.Port = 587
smtpConformationEmail.EnableSsl = True
smtpConformationEmail.UseDefaultCredentials = True
smtpConformationEmail.Credentials = credConformationEmail
Try
smtpConformationEmail.Send(sendConformationEmail)
lblReturnMessage.Text = "Email Send Successfully!!!"
Catch ex As Exception
lblReturnMessage.Text = ex.ToString
End Try
T. Payment Gateway Web API
1. Payment Service Provider
2. Online Payment Gateway
3. Authorize.net
4. Authorize.net API options
5. Credit Card Test Account#
6. Web API, Web Services, Microservices
7. Sign up an Authorize.net Sandbox account:
a. https://developer.authorize.net/hello_world/sandbox.html
b. Obtain the login ID and transaction key for your account.
8. Create Payment.aspx (web form without master page) with web controls:
Credit Card: <asp:TextBox ID="tbCreditCard" runat="server"></asp:TextBox><br />
<asp:Button ID="btnAPI" runat="server" Text="Send" /><br />
Authorization Code: <br />
Trasaction ID: <br />
Return Array:<asp:Label ID="lblReturnArray" runat="server" Text=""></asp:Label><br />
9. Develop script to send credit card info to Authorize.net, analyze the returned
message array, and display the result.
Imports System.Net
Imports System.IO
Public Class Payment
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
End Sub
Private Sub btnAPI_Click(sender As Object, e As EventArgs) Handles btnAPI.Click
' test server
Dim post_url As String = "https://test.authorize.net/gateway/transact.dll"
' name/value pairs using a dictionary
Dim post_values As New Dictionary(Of String, String)
post_values.Add("x_login", "") ' your login ID
post_values.Add("x_tran_key", "") ' your transaction key
post_values.Add("x_delim_data", "TRUE")
post_values.Add("x_delim_char", ",")
post_values.Add("x_relay_response", "FALSE")
post_values.Add("x_type", "AUTH_ONLY")
post_values.Add("x_method", "CC")
post_values.Add("x_card_num", tbCreditCard.Text)
post_values.Add("x_exp_date", "0121")
post_values.Add("x_amount", "19.99")
post_values.Add("x_description", "Sample Transaction")
post_values.Add("x_first_name", "John")
post_values.Add("x_last_name", "Doe")
post_values.Add("x_address", "1234 Street")
post_values.Add("x_state", "WA")
post_values.Add("x_zip", "98004")
' converts them to the proper format "x_login=&x_tran_key=&..."
Dim post_string As String = ""
For Each field As KeyValuePair(Of String, String) In post_values
post_string &= field.Key & "=" & HttpUtility.UrlEncode(field.Value) & "&"
Next
Response.Write(post_string + "<br><br>")
post_string = Left(post_string, Len(post_string) - 1) ' remove the last "&"
Response.Write(post_string + "<br><br>")
' create an HttpWebRequest object to communicate with Authorize.net
Dim objRequest As HttpWebRequest = CType(WebRequest.Create(post_url),
HttpWebRequest)
objRequest.Method = "POST"
objRequest.ContentLength = post_string.Length '
https://github.com/dotnet/runtime/issues/28963
objRequest.ContentType = "application/x-www-form-urlencoded" ' the keys and values
are encoded in key-value tuples separated by '&', with a '=' between the key and the value.
' write text to a stream
Dim myWriter As StreamWriter = Nothing
myWriter = New StreamWriter(objRequest.GetRequestStream())
myWriter.Write(post_string)
myWriter.Close()
' create an HttpWebResponse object to process the returned values in a stream and
convert it into a string
Dim objResponse As HttpWebResponse = CType(objRequest.GetResponse(),
HttpWebResponse)
Dim responseStream As New StreamReader(objResponse.GetResponseStream()) ' get the
response from authorize.net
Dim post_response As String = responseStream.ReadToEnd()
Response.write(post_response)
responseStream.Close()
' break the response string into an array
Dim response_array As Array = Split(post_response, post_values("x_delim_char"), -1)
' the results are output to the screen in the form of an html numbered list.
Dim strReturnArray As String = "<OL>"
For Each value In response_array
strReturnArray = strReturnArray + "<LI>" & value & " </LI>" & vbCrLf
Next
strReturnArray = strReturnArray + "</OL>"
lblReturnArray.Text = strReturnArray
' display Authorization Code and Transaction ID by response_array(x)
End Sub
End Class
10. Homework: Add the following four label controls:
a. lblAuthorizationCode to show Authorization Code
b. lblTransactionID to show the Transaction ID
11. Email to
[email protected] the following two screenshots (with the subject “Web
API Homework”) by noon 10/8:
a. The code behind that shows your Login ID and Transaction Key,
b. The webpage that shows the result with the Autnorization Code and
Transaction ID.
U. Enable IIS with ASP.net
1. Register ASP.net with IIS: https://stackoverflow.com/questions/42301405/how-to-
register-asp-net-on-windows-10
2. In IIS, right-click Default Web Site
1. add an Application with the name in Alias: CurrencyConverterSpring2025
2. Chose a Physical path: C:\inetpub\wwwroot\CurrencyConverterSpring2025
3. Ok
3. Enable/Disable Directory Browsing
4. Run localhost/CurrencyConverterSpring2025/ in browser to view the directory
5. Add and moving Default.aspx to top under Default Document
6. Run in browser: localhost/CurrencyConverterSpring2025/Default.aspx
V. Web Services
1. Web services
2. Protocols: SOAP (Simple Object Access Protocol), WSDL (Web Services Description
Language)
3. XML Services Access: Get, Post, SOAP
4. Web Services (SOAP) vs. Web API (RESTful)
5. A REST API is an API that conforms to the design principles of the REST
(Representational State Transfer) architectural style. For this reason, REST APIs are
sometimes referred to RESTful APIs.
6. Create a Web Services project:
a. Create an empty ASP.net project named CurrencyConverterWSSpring2025. For
your assignment: Your Last Name + WS (e.g., HwangWS, GonzalesWS, etc.)
b. Create a Web Service called CurrencyConverter.asmx in the project. For your
assignment: Your Last Name + WS (e.g., HwangWS.asmx, GonzalesWS.asmx, etc.)
c. Develop script for currency conversion:
<WebMethod()>
Public Function CurrencyConvert(ByVal strCurrencyType As String, ByVal sngCurrencyIn As
Single) As String
Dim sngCurrencyOut As Single
Select Case strCurrencyType
Case "ca"
sngCurrencyOut = CSng(sngCurrencyIn) * 1.1
Case "jp"
sngCurrencyOut = CSng(sngCurrencyIn) * 110
End Select
Return sngCurrencyOut
End Function
d. Run the project and view the two Web services in the Browser
e. Configure the folder to an “Virtual Directory” called
CurrencyConverterWSSpring2025 in IIS to run the Web Services from a local web
server:
Enable Directory Browsing:
f. Run the Web Service: http://localhost/CurrencyConverterWSSpring2025
7. Create the Web Service client to use the CurrencyConverter Web Services.
a. Create an empty ASP.net project Named CurrencyConverterWSClientSpring2025.
b. Create a Web Form WebServiceClient.aspx with the following web controls:
<asp:TextBox ID="tbCurrencyIn" runat="server"></asp:TextBox><br />
<asp:DropDownList ID="ddlCurrencyType" runat="server">
<asp:ListItem Selected="True" Value="ca">Canadian</asp:ListItem>
<asp:ListItem Value="jp">Japaense</asp:ListItem>
</asp:DropDownList><br />
<asp:Button ID="btnConvert" runat="server" Text="Convert" /><br />
<asp:Label ID="lblCurrencyOut" runat="server" Text="Label"></asp:Label>
c. Develop script to request the web services:
i. Add web reference: right-click “Reference” in the Solution Explorer > Add
Service Reference > Advanced > Add Web Reference
ii. Enter
http://localhost/CurrencyConverterWSSpring2025/CurrencyConverter.as
mx
iii. Name and add the web reference: OnlineStoreWS and Add this
reference. (The VS then downloads the WSDL of the Web services, analyze
it, and create an class store locally to be used.)
iv. Open the OnlineStoreWS class view in the Object Browser window to find
the CurrencyConverter class.
v. In WebServiceClient.aspx.vb, develop code for the click event of the
btnConvert button:
Imports CurrencyConverterWSClientSpring2025.OnlineStoreWS
Private Sub btnConvert_Click(sender As Object, e As EventArgs) Handles btnConvert.Click
Dim objWS As OnlineStoreWS.CurrencyConverter = New CurrencyConverter()
lblCurrencyOut.Text = objWS.CurrencyConvert(ddlCurrencyType.SelectedValue,
tbCurrencyIn.Text)
End Sub
End Class
i. Run this Web services client.
8. Demo database Web Services example
a. Open WebService1 project (c:\inetpub\wwwroot)
vi. Show Access database: ClientDatabase.mdb
vii. Run the web services using 1000000009 as the order number
1. GetAccountNumber
2. GetOrderDetails
3. GetOrderXML (in c:\xml)
viii. Enter 1000000009 as the order number
b. Open WebService1Client project
ix. Open MSSQL database: Order.mdf
x. Run Default.aspx
xi. Enter 1000000009 as the order number
xii. Check the OrderDetail table
xiii. Show web reference: http://localhost/WebService1/Service1.asmx?wsdl