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

📄 details.aspx

📁 This is a book about vb.you could learn this from this book
💻 ASPX
字号:
<%@ Page Language="VB" Inherits="IBuyAdventure.PageBase" src="components/stdpage.vb" %>
<%@ Register TagPrefix="IBA" TagName="Header" Src="UserControl\Header.ascx" %>
<%@ Register TagPrefix="IBA" TagName="Footer" Src="UserControl\Footer.ascx" %>
<%@ Register TagPrefix="IBA" TagName="Categories" Src="UserControl\Categories.ascx" %>
<%@ Register TagPrefix="Wrox" Namespace="WroxControls" Assembly="RatingMeter" %>
<%@ Import Namespace="System.Data" %>
<%@ OutputCache Duration="600" VaryByParam="ProductCode" %>

<html>
  <head>
    <title>IBuyAdventure Catalog</title>
  </head>

  <script language="VB" runat="server">

		Sub Page_Load(sender As Object, e As EventArgs)
		
			' User business object to fetch category products and databind
			' it to a <asp:datalist> control
			Dim productDetails As DataSet
			Dim inventory As New IBuyAdventure.ProductsDB(getConnStr())
			
			productDetails = inventory.GetProduct(Request.QueryString("ProductCode"))
			MyList.DataSource = productDetails
			MyList.DataBind()
			SectionTitle.InnerHtml = productDetails.Tables(0).Rows(0)("ProductName") & " Details"
		
		End Sub
		

		Sub DataList_ItemCreated(sender As Object, e As DataListItemEventArgs)
		
			Dim myRowView As DataRowView
			Dim myRow As DataRow
			
			myRowView = e.Item.DataItem
			myRow = myRowView.Row
			
			If myRow("OnSale") = 0 Then
				e.Item.FindControl("saleItem").Visible = false
			End If
			
		End Sub

  </script>

  <body background="images/back_sub.gif">
    <form runat="server">
	    <font face="Verdana, Arial, Helvetica" size="2">
	      <table border="0">
	        <tr>
	          <td colspan="5">
	            <IBA:Header id="Header" runat="server"/>
	          </td>
	        </tr>
	        <tr>
	          <td rowspan="5" align="left" valign="top">
	            <IBA:Categories id="Categories" runat="server"/>
	            <br><br><br>
	          </td>
	          <td valign="top" align="center">
	            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <h3 id="SectionTitle" runat="server" />
	            <asp:datalist id="MyList" BorderWidth="0" RepeatDirection="horizontal" RepeatColumns="2" OnItemCreated="DataList_ItemCreated" runat="server">
	              <itemtemplate>
	                <table>
	                  <tr>
	                    <td align="right" valign="top" width="150">
	                       <img src='<%# DataBinder.Eval(Container.DataItem, "ProductImageURL","images/{0}") %>'>
	                    </td>
	                    <td align="left" valign="top">
	                      <font size="2">
	                        <b>Information:</b><br><br>
	                        <%#DataBinder.Eval(Container.DataItem, "ProductDescription")%><br><br>
	                        <%#DataBinder.Eval(Container.DataItem, "ProductCode")%><br><br>
	                        Product first introduced <%#DataBinder.Eval(Container.DataItem, "ProductIntroductionDate","{0:d}" )%><br><br>
	                        <span id="saleItem" runat="server">
		                        &nbsp; <img src="images/saleTag1.gif">
	                          <asp:label id="lab" runat="server" />
	                        </span>
	                        <b><%#DataBinder.Eval(Container.DataItem, "UnitPrice", "{0:C}")%></b><br><br>
	                        <a href='ShoppingCart.aspx?ProductCode=<%#DataBinder.Eval(Container.DataItem, "ProductCode")%>'>
	                          <img src="images/order.gif" width="55" height="15" alt="Order" border="0">
	                        </a><br><br>
	                       <Wrox:RatingMeter runat="server" Score='<%#CDbl(DataBinder.Eval(Container.DataItem, "Rating"))%>' Votes="1" MaxRating="5" CellWidth="51" CellHeight="10" />
	                      </font>
	                    </td>
	                  </tr>
	                </table>
	              </itemtemplate>
	            </asp:datalist>
	          </td>
	        </tr>
	        <tr>
	        	<td>
	        		<IBA:Footer runat="server" />
	        	</td>
	        </tr>
	      </table>
	    </font>
    </form>
  </body>
</html>

⌨️ 快捷键说明

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