Click here to Skip to main content
15,936,119 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am facing a problem. I have a hiddenfield in my master page which I am setting using code behind when first page of my application gets load. While navigating from first page to second page, I want that hidden field's value on my second page too. But the value comes as empty string.

I don't want to use session to achieve the above.

please help!!!

Thank you..
syed shanu 27-May-14 20:40pm    
Can you post your code here it will be more helpfull to find the solution.Mean time check this link hope this will help for you.

1 solution

The main problem here is you are setting value for the hidden field in first page load and when the second page is loaded the hidden field refreshed with default value.

You also dont want to use session.

Then the only way here is to pass the value in query string if it is short enough to do the same.

Ex :-

From Page1 :

In Page2 load :-
if (Request.QueryString["value"] != null)
   var val = Request.QueryString["value"];

Hope this will be of help.
Share this answer

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