Solved

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

Posted on 2011-09-24
2
327 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LINQ - C# to VB convertion 12 45
How to avoid saving tif files a 2nd time using VS2015 and C#? 1 27
VB.Net How to Exit Sub - Exit Form??? 5 48
SQL Exceptions 3 35
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!
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now