How do I set a profile variable in the Session_Start section of Global.asax.
Here is a sample of my code from Global.asax:
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a new session is started
Application.Lock()
Dim Id As Int32 'This Id will be used while getting device information
Id = mdot.SessionTrack.IncrementSession() 'Create new Session record
.....
Application.UnLock()
End Sub
The mdot.SessionTrack.IncrementSession() function returns a value created from a SQL database insert.
What I want to do is maintain the value of 'Id' for this session so I can use it as a key in future database functions. I tried creating a profile name "Id" but I get an error out when trying to set it in this code section. Apparently I can only set a profile value from a page object.
Thanks, Arial