Background:
I have an MVC layout (master) view that uses @ Html.RenderAction to display a dropdown in the left side navigation bar. This drop-down list will be displayed on all pages of the site. The drop-down menu is wrapped in a form element and when the drop-down list is changed, the form is published.
Question:
Now, as soon as the form is published, I need to reload the contents of the current page (on any page on which the user is currently enabled ...) with the value of the drop-down list attached to the query string. This would mean replacing the value that may already be in the query from the previous selection.
Example:
- The user goes to the websiteβs homepage:
URL: / Home /? dropdownvalue = blue
At this point, "Blue" is displayed in the drop-down list. The user changes the value in the drop-down list to "Red." I need to reload the page with the following url -
/ Home /? Dropdownvalue = Red
- The user goes to another page on the site:
URL: / CustomerFavorite /? dropdown = red
Change the value in the drop-down list from "Red" to "Green."
The CustomerFavourite page must be reloaded with a Green in the request.
Sorry for the long post. But I thought about providing more information to clarify the problem.
Thanks.
source share