By default it is always enabled, however using code, the session state can be disabled on the controller.
In the Category Controller class, add the following attribute: The above code disables the session state on request processing.
Minimum Value = "01/01/2011" Range Validator BMIDte.
But I recommend you to read through the rest of the article to know why we are doing what we are doing.
Aspx page: We are referencing the j Query library in the first line.
Step 5: Scaffold the Index.cshtml from the Index action method and make the following changes in it: When the submit button is clicked, it posts to the Index action method with Http Post.
Apply breakpoint on the Http Post Index action method to check the value in the Temp Data[“Category”] when the end-user posts to the Index view.
Keep(“Category”) will maintain the state of the data now even when the response view is loaded. You will see the Temp Data[“Category”] is maintained as shown here: That’s it, in MVC we can make use of Temp Data to maintain the state of the values across the requests using which data can be passed across controllers.
Since Temp Data makes use of the Session State behavior, it must be on the controller using Temp Data.
Protected Sub form1_Load(By Val sender As Object, By Val e As System.
Maximum Value = "12/31/2011" Range Validator BMIDte.
NET Web Forms page to another, you will frequently want to pass information from the source page to the target page.