Hi,
In WGX i used to create session variables with:
VWGContext.Current.Session.Item(“HostingMail_Type”)
for asp.net there is system.web.httpcontext.session
With WiseJ, what shoul I use, is there a WiseJ Session variables like it existed in WGX?
In Wisej the Session object is dynamic so you can refer to any field without using the indexer:
Application.Session.IsLoggedOn = "whatever"; Application.Session.IsLoggedOn = true; Application.Session.MyName = "Test"; etc.
To check the authenticated user you can use:
Application.User or Application.LogonUserIdentity.
We don’t use the Session.Items since we don’t use the ASP.NET session. You can simply do:
Application.Session.hostinguser = txtusername.Text.Trim();
Note: in VB.NET you need Strict Off to use dynamic objects. Otherwise use the indexer with the field name.
Thanks Frank!
Where can i post a feature request, for the “IsLoggedOn” like in WGX, that when it turns into false he kill’s the app?
Hi Jorge,
you can read/write session variables in Wisej as
Wisej.Web.Application.Session("Name") Best regards Frank
Hi Again,
For WGX there was something that i liked, that was:
VWGContext.Current.Session.IsLoggedOn = True
and them we used the variables on it like below, how can i do this in WiseJ?
VWGContext.Current.Session.Item(“hostinguser”) = txtusername.Text.Trim
Hi,
Any idea on this?
Jorge
Please login first to submit.