Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi In which function(Application_Start,Application_End,Application_Error,Session_Start,Application_AcquireRequestState....ect) can get Session.SessionID in global.asax page,using
VB
System.Web.HttpContext.Current.Session.SessionID


bcz when web application start at first Global.asax page execute first,so in global.asax page i will set one storage path,so i need to append sessionid also,if first time website open can get sessionid,once any event occur or page fully loaded in website cant get sessionid,it nothing and show error.

So in which function can get sessionid always ? or how to check sessionid have or not when page fully loaded in Application_Start function in Global.asax page in VB

Note:Coding Language is VB

Regards
Aravind
Posted

1 solution

C#:
C#
void Session_Start(object sender, EventArgs e)
{
    string sessionId = System.Web.HttpContext.Current.Session.SessionID;

}


VB:
VB
Private Sub Session_Start(sender As Object, e As EventArgs)
    Dim sessionId As String = System.Web.HttpContext.Current.Session.SessionID

End Sub
 
Share this answer
 
v2
Comments
Aravindba 27-Jun-14 4:33am    
it work thanx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900