I want to show a Session Variable data on View.
How can i achieve it.
I am storing some data in Session varaibles and noew i want to display it on View please help me.
I am new Asp.Net MVC 2
Please suggest.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
use the ViewData and pass it to the view
in your controller set up something like ViewData[“namehere”] = value
then in your View you can call the value of Viewdata[“name here”] – think of the ViewData as a bag that you can put properties and their values into and not need to explicitly pass the viewdata to the view for the view to use it