📄 default.aspx.vb
字号:
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' In order for the SqlDataSource1 to bind
' correctly it needed an input parameter
' and unfortunately I couldn't specify
' Profile.UserName since it wasn't in the
' property bag of Profile, but was a real
' property. So, this is a bit of a kluge
' and I feel bad about it, but since we're
' using session, why not pile one more
' data element on top ... :)
If Profile.IsAnonymous = False Then
Session.Add("UserName", User.Identity.Name)
End If
End Sub
Sub Page_PreInit(ByVal sender As Object, ByVal e As EventArgs) Handles Me.PreInit
If IsNothing(Request.QueryString("theme")) = False Then
Profile.Theme = Request.QueryString("theme")
End If
If Profile.IsAnonymous = False Then
If Profile.Theme <> "" Then
Page.Theme = Profile.Theme
End If
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -