Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can Anyone Help me....

How to validate session id to find new user or current user...
Posted
Updated 5-Dec-11 22:29pm
v2
Comments
Uday P.Singh 6-Dec-11 4:36am    
not clear, what are you trying to implement?
M.Narmatha 6-Dec-11 4:38am    
every user having seperate session id...if add a item to addcart means i have to whether the user is new or current user...

1 solution

Try this code:

C#
public static string TheSessionId() {
    HttpSessionState ss = HttpContext.Current.Session;
    HttpContext.Current.Session["test"] = "test";
    HttpContext.Current.Response.Write(ss.SessionID);
    return "ok";
}
 
Share this answer
 

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