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,
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.
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.