Solved

Usng HttpContext.Current.Session][ to pass values from Controller to View

Posted on 2011-09-24
2
329 Views
Last Modified: 2012-05-12
When I was newer to MVC I used the Session context dictionary to pass any type of variable between the Controller, Model and the View. But then I realized it was not strongly typed. True?

So I began using properties and functions in my ViewModel  to pass data to the View and back to the Controller.  But I am now on a project which already has been using the Session variable.

What is considered Best Practice?

Thanks.
0
Comment
Question by:newbieweb
2 Comments
 
LVL 15

Accepted Solution

by:
navneethegde earned 500 total points
ID: 36594957
0
 

Author Closing Comment

by:newbieweb
ID: 36598820
Thanks!
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question