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

I need to save the values of BO object into session variables after logged in successfully to the website.

Here is my code:
C#
IList<ConfigurationMaster> pConfigurationMaster = BLLConfigurationCountryandState.Instance.GetConfiguration();

Session[ConfigEnum.Country.ToString()] = new KeyValuePair<string, string>(pConfigurationMaster[0].ConfigNameId, pConfigurationMaster[0].ConfigValue);

Session[ConfigEnum.State.ToString()] = new KeyValuePair<string, string>(pConfigurationMaster[1].ConfigNameId, pConfigurationMaster[1].ConfigValue);

Session[ConfigEnum.City.ToString()] = new KeyValuePair<string, string>(pConfigurationMaster[2].ConfigNameId, pConfigurationMaster[2].ConfigValue);

Session[ConfigEnum.AcademicYear.ToString()] = pConfigurationMaster[3].ConfigValue;


Here i don't want to use the pConfigurationMaster[index].configvalue;

It's very urgent. Any one please help me in this.

-Sindhu.A
Posted
Updated 22-Feb-12 1:39am
v3
Comments
BobJanova 22-Feb-12 9:45am
   
Why not just put pConfigurationMaster in the session?

Also, 'very urgent' tends to mean people skip over your question. If it's 'very urgent' then *you need to do some work*, CP is not a hire-a-coder site.

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