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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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

    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT