How to Maintain a value through out the Page Session ?? [Resolved]

Posted by Vikram_Rebel under ASP.NET MVC on 12/23/2013 | Points: 10 | Views : 1719 | Status : [Member] | Replies : 2
ave on a project, where i have 7 different Web pages (Architecture is MVC 4). and my question is have a Primary key in my first page. Say Customer ID. I need to make this value available in all the pages, where i need to fetch this value and retrieve other values based on the Customer ID.

I have used session, but thats not the way to implement since this has cons.

has there any better way , where i can implement this thing ?

Thanks in Advance :)


Posted by: vishalneeraj-24503 on: 12/24/2013 [Member] [MVP] Platinum | Points: 25

Instead of session,you can use Cookie,but if cookie is disabled,then you can not.

You can also use query string,but it will have a Sql-injection but you can encrypt values in URL.

So better you use Session. It's not overhead on the server.

Vikram_Rebel, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response