global.asax
来自「This is a book about vb.you could learn 」· ASAX 代码 · 共 28 行
ASAX
28 行
<%@ 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 + =
减小字号Ctrl + -
显示快捷键?