Click here to Skip to main content
16,016,570 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Professionals,

I have some html select controls querying dates on an asp master page.

When some content page is loaded the master page gets refreshed and hence the dates in the select controls are initialized back and loses the newly selected values.

To overcome this, I introduced a html hidden input field and 'onbeforeUnload' of the master page assigned the selected values in the date controls to the input field hoping to put it back to the controls from this, but when the master page loads back the input field is also initialized and is empty.

I have also tried setting EnableViewState=true for this page.

Please suggest a right way to achieve this apart from AJAX. We cannot use AJAX for this project.

Thanks in advance.
Posted
Updated 17-May-14 1:33am
v3

1 solution

You should be using code similar to (HiddenField)Page.Master.FindControl("hdnField");
 
Share this answer
 
Comments
Priya-Kiko 17-May-14 7:36am    
Thanks for immediate response. The hidden field is set at client side and i have to assign it in the client side itself.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900