Currently in the process of transitioning an outdated asp.net web forms page to a new asp.net mvc version, and facing a minor hurdle that I'd like to address.
Upon user login, they are directed to a messages page at /Alerts. From there, they have the option to close individual messages by clicking on the x's. Once all messages are closed, they are automatically redirected to another page.
The original site used postbacks, so the URL would remain constant. In my updated version, I intend to turn the x button into a link that leads to /Alerts/Confirm/xx where xx represents the id. However, after processing, the address bar continues to display that specific URL instead of returning to /Alerts as desired.
Possible solutions include:
1) Implementing AJAX for processing;
2) Redirecting back to /Alerts after processing;
3) Replacing X links with a submit button and using JavaScript to pass different IDs based on which message is being acknowledged, allowing me to change the Confirm method to an HttpPost-accepting Index method;
4) Considering URL Rewrites as an option (although unsure about its feasibility).
Could there be a straightforward solution that accomplishes what I'm aiming for?