Click here to Skip to main content
15,890,947 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to generate new session id with hidden field in mvc4?
Posted
Comments
ZurdoDev 29-Sep-15 9:54am    
Do you mean how to store the session id in a hidden field?

hdnField.Value = Session.SessionID;

Pretty simple. Is that what you mean?
DGKumar 29-Sep-15 10:09am    
Basically i want to maintain unique session id and store the value if the session id already exist then new session id should be generate and store another data without disturbing previous session.
ZurdoDev 29-Sep-15 10:12am    
Session is something automatically handled by ASP.Net. You should not ever need to create a new session id.
DGKumar 29-Sep-15 10:35am    
If i want to generate multiple session ids what is the approach ?
ZurdoDev 29-Sep-15 10:50am    
You don't. A new session is generated each time a new user visits your site. You don't create the session id. ASP.Net manages it.

Perhaps you can explain more in depth what you are trying to do because it sounds like the session may not be what you think it is.

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