The menu on display here utilizes javascript to dynamically update its state.
As a result, your HTML page becomes stateful, leading to potential challenges in properly managing the transfer of state between your client and server code.
To address this issue, there are three viable solutions available:
- Transfer your client application's state (current menu) to your ASP backend for generating a new page based on this updated state.
- Send your application's state to your ASP backend and have it returned to the client browser, ensuring that the client re-applies this state using javascript.
- Solely retrieve new data from your ASP backend and use client-side javascript to render the updated page content.
This problem may also indicate that you're not employing the most appropriate tools for constructing your menu. There appears to be a conflation of server-side and client-side rendering practices, suggesting that a shift towards complete server-side rendering might be more beneficial in your case.