Click here to Skip to main content
15,892,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Can any one tell me how to use sessions when saving several field's data into Database.
Posted
Comments
Thanks7872 18-Sep-13 2:41am    
when saving several field's data? Not clear enough.
DileepReddyC 18-Sep-13 2:52am    
Suppose 50 odd fields are to be saved
Harshil_Raval 18-Sep-13 3:44am    
Ohh! don't make session so heavy. Why you want to store these 50 field value in session?

1 solution

You can store whole datatable in session
C#
Session["SessionName"] = dt; // dt is data table
// get data like this
DataTable Dtbl= (DataTable)Session["SessionName"];

or else you can make a list of fields you want to store in session, refere this similar discussion[^]
 
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