ASP.NET
  Home arrow ASP.NET arrow Page 2 - Order-Related Modules for an ASP.NET AJAX ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Order-Related Modules for an ASP.NET AJAX Server-Centric Based Online Shopping Website
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2007-12-26

    Table of Contents:
  • Order-Related Modules for an ASP.NET AJAX Server-Centric Based Online Shopping Website
  • Behind the Scenes
  • More Behind the Scenes Code
  • Web Handler
  • Buying Goods
  • Viewing the Shopping Cart
  • Page Initialization

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Order-Related Modules for an ASP.NET AJAX Server-Centric Based Online Shopping Website - Behind the Scenes


    (Page 2 of 7 )

    Behind the Scenes

    Now let's explore the HTML coding. Here, again, due to the length of the contents we only list the most important part, as follows.

    <td align="center" style="width: 577px;" valign="top">

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    <Triggers>

    <asp:AsyncPostBackTrigger ControlID="ProductList" EventName="ItemCommand" />

    </Triggers>

    <ContentTemplate>

    <asp:GridView ID="ProductView" CssClass="Text" runat="server" Width="100%" AutoGenerateColumns="False" DataKeyNames="ProductID" ShowHeader="False" OnRowCommand="ProductView_RowCommand" OnRowCreated="ProductView_RowCreated">

    <FooterStyle ForeColor="White" BackColor="#3B6BD1" Font-Bold="True"></FooterStyle>

    <SelectedRowStyle Font-Bold="True" ForeColor="Navy" BackColor="#FFCC66" BorderColor="CornflowerBlue" />

    <RowStyle ForeColor="#333333" BackColor="#FFFBD6" BorderColor="CornflowerBlue" BorderStyle="Solid" BorderWidth="1px" />

    <Columns>

    <asp:TemplateField>

    <ItemTemplate>

    <table cellpadding="2" cellspacing="0" width="100%" border="0" class="Text">

    <tr>

    <td>

    <a href='../Admin/Product/ProductInfo.aspx?ProductID=<%# DataBinder.Eval(Container.DataItem,"ProductID")%>' target="_blank">

    <asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">

    <asp:Image ID="ProductPicture" Runat="server" Width="90" Height="120" ImageUrl='<%# Eval("PictureID", "../Handler.ashx?Id={0}") %>' > </asp:Image>

     

    </asp:Panel></a>

    </td>

    <td style="width: 100%;" valign="top">

    <table cellpadding="0" cellspacing="0" border="0" class="Text" style="width: 100%;">

    <tr><td style="width: 50%;" align="left" valign="top">

    <table cellpadding="0" style="width: 100%;" cellspacing="0" border="0">

    <tr>

    <td><strong class="Title">Product Name:</strong><a href='../Admin/Product/ProductInfo.aspx?ProductID=<%# DataBinder.Eval(Container.DataItem,"ProductID")%>' target="_blank"><%# DataBinder.Eval(Container.DataItem,"Name")%></a>

    </td>

    </tr>

    <tr>

    <td><strong class="Title">Price:</strong><asp:Label ID="Price" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"OutPrice")%>'></asp:Label>

    </td>

    </tr>

    </table>

    </td>

    <td style="width: 50%;" align="left" valign="top">

    <table cellpadding="0" style="width: 100%;" cellspacing="0" border="0" class="Normal">

    <tr>

    <td><strong class="Title">Manufacturer:</strong><%# DataBinder.Eval(Container.DataItem,"Sell")%></td>

    </tr>

    <tr>

    <td><strong class="Title">Manufacturing Date:</strong><%# DataBinder.Eval(Container.DataItem,"CreateDate")%></td>

    </tr>

    </table>

    </td>

    </tr>

    <tr><td colspan="2" align="left"><strong class="Title">Description:</strong><br /><%# DataBinder.Eval(Container.DataItem,"Desn")%></td></tr>

    <tr><td colspan="2" align="left"><hr size="1" /></td></tr>

    <tr><td colspan="2" align="left"><a href='../Admin/Product/ProductInfo.aspx?ProductID=<%# DataBinder.Eval(Container.DataItem,"ProductID")%>' target="_blank">

    Details</a>&nbsp;&nbsp;&nbsp;<a href='../Desktop/Comment.aspx?ProductID=<%# DataBinder.Eval(Container.DataItem,"ProductID")%>' target="_blank">

    View Product Comment</a>

     

    <asp:Button ID="BuyBtn" Runat="server" CssClass="ButtonCss" Text="Add to shopping cart" Width="50%" CommandName='<%#DataBinder.Eval(Container.DataItem,"Name") %>'></asp:Button>

    </td></tr>

    </table>

    </td>

    </tr>

    </table>

    </ItemTemplate>

    </asp:TemplateField>

    </Columns>

    </asp:GridView>

    </ContentTemplate>

    </asp:UpdatePanel>

    </td>

    First, the above code only relates to the GridView control that is used to display the corresponding product information that belongs to the selected product category. To gain a partially refreshing effect, we typically use an ASP.NET AJAX server control named UpdatePanelto enclose the GridView control.

    More ASP.NET Articles
    More By Xianzhong Zhu


     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek