Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid Master Page hidden field value lost on new page load.

I have a hidden field on master page. I am setting its value on a child page through JavaScript. When I click link on this child page it redirects to another page. Now I want to get the hidden field value on this new child page. But the value is lost(obviously). How can I persist this value.

Anyone help thanks in advance.

like image 569
Irfan TahirKheli Avatar asked Nov 04 '22 10:11

Irfan TahirKheli


1 Answers

You can pass the value in the query string like this:

http://YourUrl.com/YourPage.aspx?YourValue=foo

Alternatively, you can initiate an AJAX call that stores the value in the session and then retrieve the value on the page_load event of the next page.

like image 86
James Hill Avatar answered Nov 09 '22 09:11

James Hill