Hello,
tell me one thing:
How it is possible to know profTheme.Preferences.Theme of user that is seeing the page?
It has of being made a linking to the database, right?
With this code in basePage:
Code:
Protected Overrides Sub OnPreInit(ByVal e As System.EventArgs)
Dim id As String = Globals.ThemesSelectorID
If id.Length > 0 Then
Dim profTheme As ProfileCommon = HttpContext.Current.Profile
If Me.Request.Form("__EVENTTARGET") = id AndAlso _
Not String.IsNullOrEmpty(Me.Request.Form(id)) Then
Me.Theme = Me.Request.Form(id)
profTheme.Preferences.Theme = Me.Theme
Else
If Not String.IsNullOrEmpty(profTheme.Preferences.Theme) Then
Me.Theme = profTheme.Preferences.Theme
End If
End If
End If
MyBase.OnPreInit(e)
End Sub
The system make one connection to database(adding to all the others throughout the page) everytime the page is postback...
Are you sure this is a good strategy ?
Thanks