My site will have partial views rendered on each page, to provide search functionality.
As this is shared on several pages, and all new pages, I don't want to hard code anything or do anything poking around the HTTP Context to determine which master view to render.
As such, I have two questions:
Now I realize I can render another full view, like a search results page with a message, but my preference is to have this rendered all in the partial view.
Thanks in advance.
Can the form in your partial view use ajax instead of performing a regular POST. Then you don't have to worry about where the request came from.
If the ajax post is successful you can redirect the user to the search results page.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.