john parsons
asked on
Master Content Pages, WebForms, and Session Variables
I have a Visual Studio 2013 ASP.NET project that contains a Master page, a ContentPage, and a WebForm. Although the WebForm is a member of this project, it is not associated with the Master page. If I define and set a session variable within the Page_Load of the content page, the WebForm can see the session variable and its value (as expected). I can update the session variable with the code-behind of the WebForm and the code-behind of the content page can access the update (again, as expected).
Also within the content page, I have a Javascript (Jquery) function that maniuplates controls on the content page based on the value of the session variable. However this javascript function can only "see" changes made to the session variable when the changes are made by the code-behind of the content page. If the code-behind of the WebForm updates the session variable, the javascript function does not see the change, and continues using whatever values were set by the content page.
How do I get the javascript function to see the session variable updates that were made by the WebForm?
Also within the content page, I have a Javascript (Jquery) function that maniuplates controls on the content page based on the value of the session variable. However this javascript function can only "see" changes made to the session variable when the changes are made by the code-behind of the content page. If the code-behind of the WebForm updates the session variable, the javascript function does not see the change, and continues using whatever values were set by the content page.
How do I get the javascript function to see the session variable updates that were made by the WebForm?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.