Updating a session variable without postback
Since Temp Data makes use of the Session State behavior, it must be on the controller using Temp Data.
By default it is always enabled, however using code, the session state can be disabled on the controller.
Also, please have in mind that creating custom controls is out of our support scope, even if they are inherited directly from Telerik controls.
Regards, Eyup Telerik Do you want to have your say when we set our development plans?
Organized around concepts, this e Book aims to provide a concise, yet solid foundation in C# and .
Thank you, unfortunately I wrote my own multi custom filter to suit my needs and discarding the default one.
Run the Application and navigate to the Search Products action of the Category Controller: Products The following view will be displayed: Enter Category Id in the Text Box and click on the ‘Search’ button.The Product Index view will be displayed: Click on the ‘Post’ button which will enter in the debug-mode to the Http Post Index action method.We have already applied the breakpoint on this Index method. It will display the values in the Temp Data[“Category”] as zero (0) and the data will be null as shown here: (Note: These are two different images showing debug from LHS and RHS of this expression) The value from the Temp Data[“Category”] is null because the Temp Data gets killed when the response is completely loaded.Step 6: To maintain the life of the Temp Data[“Category”], make the following change in the Http Get Index Action method of the Product Controller: The Temp Data.
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.During this controller transition, value entered from one controller needs to be used by another controller for some processing.