Reputation: 642
I have a master page in asp.mvc application. On this master page I have one hidden field which value should be saved between the postback. How Can I achieve it?
thanks,
Upvotes: 0
Views: 1161
Reputation: 1039498
How Can I achieve it?
This will depend on how you are performing those postbacks. One possibility would be to simply include it inside the form that you are posting. Another possibility is to use javascript and subscribe for the .submit event of your form and inside read the value of the hidden field and for example append it inside another hidden field to the current form or to the query string so that its value is sent to the server. There might also be other solutions. All will depend on your specific scenario and requirements.
Upvotes: 1