userControl/Category1.ascx
(完整代码) 2KB<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Category1.ascx.cs" Inherits="MyPetShop.userControl.Category1" %>
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource2"
Font-Size="Large" onitemcommand="LinkButton_LinkClicked"
>
<ItemTemplate>
图片:
<asp:Image ID="ImageLabel" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"Image")%>' />
<br />
名字:
<asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
<br />
价格:
<asp:Label ID="ListPriceLabel" runat="server" Text='<%# Eval("ListPrice") %>' />
<br />
供应商:
<asp:Label ID="SuppIdLabel" runat="server" Text='<%# Eval("SuppId") %>' />
<br />
描述:
<asp:Label ID="DescnLabel" runat="server" Text='<%# Eval("Descn") %>' />
<br />
数量:
<asp:Label ID="QtyLabel" runat="server" Text='<%# Eval("Qty") %>' />
<br />
<asp:ImageButton ID="imagebtnBuy" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"ProductId")%>' CommandName="buy" runat="server" ImageUrl="~/images/购买.jpg"/>
<br />
<asp:LinkButton ID="LinkButton1" runat="server"
CommandArgument='<%#DataBinder.Eval(Container.DataItem,"ProductId")%>'
CommandName="Pingjia">查看商品评价</asp:LinkButton>
<br />
</ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [ProductId],[Name], [ListPrice], [SuppId], [Descn], [Qty], [Image] FROM [Product] WHERE ([CategoryId] = @CategoryId)">
<SelectParameters>
<asp:QueryStringParameter Name="CategoryId" QueryStringField="CategoryId"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Panel ID="Panel1" runat="server" Height="75px" Width="247px">
<asp:TextBox ID="TextBox1" runat="server" Height="56px" TextMode="MultiLine"></asp:TextBox>
</asp:Panel>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
