?? items.aspx
字號:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="Items.aspx.cs" Inherits="Items" Title="Fabrikam Inc: Items" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<!--
Title Under Menu
-->
<div id="breadcrumb">
產品</div>
<div id="content-container-three-column">
<!--
CONTENT SIDE 1 COLUMN
-->
<div id="content-side1-three-column">
<h2>
<a href="Items.aspx">所有產品</a></h2>
<asp:TreeView ID="TreeView1" runat="server"
OnSelectedNodeChanged="TreeView1_SelectedNodeChanged"
ShowLines="True" ExpandDepth="0"
LineImagesFolder="~/TreeLineImages" NodeIndent="0"
LeafNodeStyle-CssClass="LeafNodesStyle"
CssClass="TreeView" NodeStyle-CssClass="NodeStyle"
ParentNodeStyle-CssClass="ParentNodeStyle"
RootNodeStyle-CssClass="RootNodeStyle"
SelectedNodeStyle-CssClass="SelectedNodeStyle"
LeafNodeStyle-Width="100%" NodeStyle-Width="100%"
ParentNodeStyle-Width="100%" RootNodeStyle-Width="100%"
SelectedNodeStyle-Width="100%">
<Nodes>
<asp:TreeNode Text="所有產品" SelectAction="Expand"
PopulateOnDemand="False" Value="All Items" />
</Nodes>
<HoverNodeStyle ForeColor="RoyalBlue" />
<SelectedNodeStyle BackColor="Transparent"
CssClass="SelectedNodeStyle" Width="100%" />
<RootNodeStyle Font-Bold="True"
Font-Size="Larger" HorizontalPadding="5px"
CssClass="RootNodeStyle" Width="100%" />
<ParentNodeStyle CssClass="ParentNodeStyle" Width="100%" />
<LeafNodeStyle CssClass="LeafNodesStyle" Width="100%" />
<NodeStyle CssClass="NodeStyle" Width="100%" />
</asp:TreeView>
</div>
<!--
CENTER COLUMN
-->
<div id="content-main-three-column">
<asp:Label ID="TopCatId" runat="server" Visible="false" Text=""></asp:Label>
<h2>
<asp:Label ID="TopCatTitle" runat="server" Visible="true" Text=""></asp:Label></h2>
<asp:Panel ID="Panel1" runat="server" Visible="true">
<asp:ObjectDataSource ID="ObjectDataSource2"
runat="server" SelectMethod="GetChildCategories"
TypeName="Catalog">
<SelectParameters>
<asp:ControlParameter Type="string"
Name="parentCategoryId"
ControlID="TopCatId"
PropertyName="Text" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:GridView ID="GridView2" runat="server"
AutoGenerateColumns="False" AllowPaging="true"
PageSize="10" DataSourceID="ObjectDataSource2"
BorderWidth="0" BorderColor="white">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="Image1"
CssClass="photo-border photo-float-left"
runat="server" Width="90px"
Height="60px"
ImageUrl='<%# "images/" + (string)Eval("ImageUrl") %>'
AlternateText='<%#(string)Eval("ImageAltText")%>' />
<b>
<asp:LinkButton ID="LinkButton2"
CommandName="Click"
CommandArgument='<%#Eval("id").ToString()%>'
runat="server" OnCommand="LinkButton1_OnCommand">
<%# Eval("Title").ToString()%>
</asp:LinkButton>
</b>
<br />
<%#Eval("Description").ToString()%>
<br />
<br />
<asp:ImageButton ID="ImageButton1"
CommandName="Click"
CommandArgument='<%#Eval("id").ToString()%>'
runat="server"
OnCommand="LinkButton1_OnCommand"
ImageUrl="images/arrow.gif" />
<asp:LinkButton ID="LinkButton3"
CommandName="Click"
CommandArgument='<%#Eval("id").ToString()%>'
runat="server"
OnCommand="LinkButton1_OnCommand">
Read More
</asp:LinkButton>
<hr />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerSettings
Mode="NumericFirstLast"
Position="TopAndBottom" />
</asp:GridView>
</asp:Panel>
<!-- Child Items -->
<asp:Panel ID="Panel2" runat="server" Visible="false">
<hr />
<asp:ObjectDataSource ID="ObjectDataSource1"
runat="server" SelectMethod="GetChildItems"
TypeName="Catalog">
<SelectParameters>
<asp:ControlParameter Type="string"
Name="categoryId"
ControlID="TopCatId" PropertyName="Text" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="true"
PageSize="10" DataSourceID="ObjectDataSource1" OnRowCreated="GridView1_RowCreated"
BorderWidth="0" BorderColor="white">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="Image1" CssClass="photo-border photo-float-left" runat="server" Width="150px"
Height="100px" ImageUrl='<%# "images/" + (string)Eval("ImageUrl") %>' AlternateText='<%# (string)Eval("ImageAltText")%>' />
<h2>
<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "ItemDetail.aspx?itemId=" + (string)Eval("Id") %>'>
<%# Eval("Title").ToString()%>
</asp:HyperLink></h2>
<br />
<%# Eval("Price","{0:C}")%>
<br />
<%# Eval("Description")%>
<br />
<br />
In Stock:
<%#(bool)Eval("InStock") ? "Yes" : "No"%>
<br />
<br />
<img src="images/arrow.gif" alt="arrow" />
<asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# "ItemDetail.aspx?itemId=" + (string)Eval("Id") %>'>
Read More
</asp:HyperLink>
<hr />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerSettings Mode="NumericFirstLast" Position="TopAndBottom" />
</asp:GridView>
</asp:Panel>
</div>
<!-- END MAIN COLUMN -->
<!--
CONTENT SIDE 2 COLUMN
-->
<div id="content-side2-three-column">
<h3 class="small">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="Testimonials.aspx">Our customer rave about our products</asp:HyperLink></h3>
<blockquote>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat.</p>
<p>
<cite>Jane Doe, Phoenix, AZ</cite></p>
</blockquote>
<blockquote>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat.</p>
<p>
<cite>John Doe, New York, NY</cite></p>
</blockquote>
<blockquote>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat.</p>
<p>
<cite>Jane Doe, Phoenix, AZ</cite></p>
</blockquote>
<blockquote>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat.</p>
<p>
<cite>John Doe, New York, NY</cite></p>
</blockquote>
</div>
<div class="clear">
</div>
</div>
</asp:Content>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -