[RESOLVED] [2.0] Object Convert
Hi all :wave:
How to convert any value as class object.
I am getting error
Cannot implicitly convert type 'object' to 'UserTracking'. An explicit conversion exists (are you missing a cast?)
C# Code:
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
try
{
UserTracking userTracking = new UserTracking();
Session["UserTracking"] = userTracking;
Response.AppendToLog("SessionStart");
}
catch
{
//Expection
}
}
void Application_PreRequestHandlerExecute(object sender, EventArgs e)
{
if (Context.Session != null)
{
UserTracking userTracking = new UserTracking();
userTracking =Session["UserTracking"]; //Error Getting Here :wave:
if (userTracking != null)
{
//userTracking.AddPage(Request.Url.ToString());
}
}
}