default.aspx
来自「This is a book about vb.you could learn 」· ASPX 代码 · 共 83 行
ASPX
83 行
<%@ Page Language="VB" Inherits="IBuyAdventure.PageBase" src="components/stdpage.vb" %>
<%@ Register TagPrefix="IBA" TagName="Header" Src="UserControl\Header.ascx" %>
<%@ Register TagPrefix="IBA" TagName="Categories" Src="UserControl\Categories.ascx" %>
<%@ Register TagPrefix="IBA" TagName="Special" Src="UserControl\Special.ascx" %>
<%@ Register TagPrefix="IBA" TagName="Footer" Src="UserControl\Footer.ascx" %>
<%@ OutputCache Duration="60" VaryByParam="*" %>
<script language="VB" runat="server" >
Private Function GetCustomerID() As String
If Context.User.Identity.Name <> "" Then
Return Context.User.Identity.Name
Else
If Session("AnonUID") Is Nothing
Session("AnonUID") = Guid.NewGuid()
End If
Return Session("AnonUID").ToString()
End If
End Function
Sub Page_Load(sender As Object, e As EventArgs)
If Request.Params("Abandon") = "1" Then
Dim cart As New IBuyAdventure.CartDB(ConfigurationSettings.AppSettings("connectionString"))
cart.ResetShoppingCart(GetCustomerID())
Session.Abandon()
FormsAuthentication.SignOut()
End If
End Sub
</script>
<html>
<head>
<title>IBuyAdventure Catalog</title>
</head>
<body background="images/back_sub.gif">
<form runat="server">
<font face="Verdana, Arial, Helvetica" size="2">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="5">
<IBA:Header id="Header" runat="server"/>
</td>
</tr>
<tr>
<td colspan="3" align="left" valign="top">
<IBA:Categories id="Categories" runat="server"/>
</td>
<td>
</td>
<td align="left" valign="top">
<h3>Welcome to IBuyAdventure!</h3>
<p>
<font face="Verdana, Arial, Helvetica" size="2">
You know the drill: Proper equipment for your climb leads to a successful ascent. IBuyAdventure
gear has been tested in the most extreme environments on earth, from the 8,000-meter
peaks of the Himalayas to the sub-arctic giants of Alaska.
<p>
<IBA:Special runat="server"/>
<p>
IBuyAdventure has all the gear you need for any excursion, from a day hike to a major
expedition. Shop with us, set up camp with us, and take our challenge. Join the IBuyAdventure
expedition!
<br>
<br>
<br>
<IBA:footer runat="server"/>
</font>
</td>
</tr>
</table>
</font>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?