One way for this is:  Get the session value and store it to View Bag in the controller and then show the view bag value to the View. There are mainly two steps.

  1. In Controller, Firstly get the value of session to the view bag by writing these code

[code] ViewBag.OrdStatus = HttpContext.Session.GetString(SessionHandler.m_sessionOrderStatus); [/code]

2. In the View, write following line to the appropriate division where you want to show the session value.

<p> @ViewBag.OrdStatus  </p>

Leave a Reply

Your email address will not be published. Required fields are marked *