📄 global.asax
字号:
<%@ Import Namespace="System.Xml" %>
<Script language="VB" runat="server">
Public Sub Application_OnAcquireRequestState(sender As Object, e As EventArgs)
Dim dom As New XmlDocument()
Dim customerType As String
' Grab the customerType from the QueryString
customerType = Request.QueryString("customerType")
' Check for values
If (IsNothing(customerType))
customerType = "Bronze"
End If
' Load the appropriate XML file
Select Case customerType
Case "Gold"
dom.Load(Server.MapPath("Gold.xml"))
Case "Silver"
dom.Load(Server.MapPath("Silver.xml"))
Case Else
dom.Load(Server.MapPath("Bronze.xml"))
End Select
Session("WelcomeMsg") = dom.SelectSingleNode("/customer/welcome").InnerText
End Sub</Script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -