⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 category.aspx

📁 asp.net技术内幕的书配源码
💻 ASPX
字号:
<%@ Page Language="C#" %>
<%@ Import Namespace="StoreComponents" %>
<!-- #include virtual="~/includes/header.aspx" -->

<script language="C#" runat=server>
 int intCategory;
 string  strCategoryDescription;

void Page_Load(Object sender , EventArgs e) 
{
  intCategory = System.Convert.ToInt32(Context.Items[ "Category" ]);
  strCategoryDescription = CachedData.GetCategoryDescription( intCategory );
  lblCategoryDescription.Text = strCategoryDescription ;
  dlstProducts.DataSource = CachedData.GetProducts( intCategory );
  dlstProducts.DataBind();
}
</Script>

<html>
<head>
<link href="~/Styles/Store.css" type="text/css" rel="stylesheet" />
<title><%=strCategoryDescription%></title>
</head>
<body bgcolor="lightblue">
<a href="Default.aspx"><img src="banner.gif" border="1"></a>
<form runat="Server">

<myControls:Tabs
  Runat="Server" />
<table width="800" height="100%" cellpadding="10" 
  cellspacing="0" border="0">
<tr>
  <td valign="top" bgcolor="lightyellow">
  <myControls:ShoppingCart
    Runat="Server" />
  </td>
  <td width="100%" valign="top" bgcolor="white">
  <asp:Label
    id="lblCategoryDescription"
    Font-Face="Arial"
    Font-Size="14pt"
    ForeColor="Orange"
    Runat="Server" />

  <asp:DataList
    id="dlstProducts"
    RepeatColumns="2"
    Width="100%"
    CellPadding="15"
    Runat="Server">
    <ItemTemplate>
    <asp:HyperLink
      Text='<%#DataBinder.Eval(Container.DataItem,"ProductName")%>'
      NavigateUrl='<%# String.Format( "Product.aspx?pid={0}&cat={1}", DataBinder.Eval(Container.DataItem, "ProductID"), intCategory) %>'
      Runat="Server" />
    </ItemTemplate>
  </asp:DataList>
  </td>
</tr>
</table>

</form>
<!-- #include virtual="~/includes/footer.aspx" -->

⌨️ 快捷键说明

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