fraturedproductlistcontrol.ascx

来自「C#语言制作asp.net网上商店的」· ASCX 代码 · 共 38 行

ASCX
38
字号
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="FraturedProductListControl.ascx.vb"
    Inherits="Shop_Product_Controls_FraturedProductListControl" %>

<div id="title" >                <asp:Literal ID="Caption" runat="server" Text="推荐商品"> </asp:Literal></div>

     <div id="item-list">

<asp:DataList ID="dlProduct" runat="server" DataKeyField="ProductID" RepeatColumns="1" RepeatDirection="Horizontal" RepeatLayout="Flow">
                    <ItemTemplate>
                        <table border="0" cellpadding="0" cellspacing="0"  > 
                            <tbody>
                                <tr>
                                    <td rowspan="2" align="left" valign="top" width="20">
                                        <div id="number">
                                            <asp:Literal ID="Number" runat="server" Text="<%# Container.ItemIndex + 1 %>"></asp:Literal>
                                        </div>
                                    </td>
                                    <td rowspan="2"  align="center" valign="middle" height="80px"  width="80px">
                                        <asp:HyperLink ID="linkProductImage" runat="server" ImageUrl='<%# String.Format("~/IHttpHandler/ImageHandler.ashx?Imagepath=~/{0}&Size={1}",Eval("ImagePath"),"80,80") %>'
                                            NavigateUrl='<%# String.Format("~/ProductDetail.aspx?pID={0}",Eval("ProductID")) %>'
                                            ToolTip='<%#String.Format("{0}", Eval("ProductName")) %>'></asp:HyperLink>
                                    </td>
                                    <td colspan="2" align="left" valign="bottom" style="height: 19px">
                                        <asp:HyperLink ID="linkProductName" runat="server" NavigateUrl='<%# String.Format("~/ProductDetail.aspx?pID={0}",Eval("ProductID")) %>'
                                            Text='<%#Eval("ProductName") %>'></asp:HyperLink></td>
                                </tr>
                                <tr>
                                    <td width="290" style="height: 43px">
                                        <asp:Label ID="lbListPrice" runat="server" Text='<%#String.Format("ListPrice: {0:C}", Eval("ListPrice")) %>'></asp:Label>
                                        <br />
                                        <asp:Label ID="lbPrice" runat="server" SkinID="bigred" Text='<%#String.Format("Price: {0:C}", Eval("Price")) %>'></asp:Label>
                                    </td>
                                  </tr>
                            </tbody>
                        </table>
           <div class="hr"></div>
                    </ItemTemplate>
                </asp:DataList></div>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?