📄 start.aspx.vb
字号:
Partial Class start
Inherits System.Web.UI.Page
Protected Sub startButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles startButton.Click
Response.Redirect("questions.aspx")
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' This is really the only reason I've added a
' start.aspx page ... so I could initialize the
' values in the Session. I probably could have
' done this in the questions.aspx page, but its already
' a complicated page, and you will probably want
' to put some introductory comments here anyway.
Dim al As ArrayList = New ArrayList()
Session.Add("AnswerList", al)
If Not Request.QueryString("testid") Is Nothing Then
Dim testID As Integer = Integer.Parse(Request.QueryString("testid"))
Session.Add("QuizID", testID)
Else
Response.Redirect("default.aspx")
End If
End Sub
Sub Page_PreInit(ByVal sender As Object, ByVal e As EventArgs) Handles Me.PreInit
If Profile.IsAnonymous = False Then
If Profile.Theme <> "" Then
Page.Theme = Profile.Theme
End If
Else
Response.Redirect("default.aspx")
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -