SurfaceController form in a page that has a hijacked route...
Hi guys!
I have an issue that I hope you can help me with. I have a hijacked route that is at the following location...
/browse-books/catalogue/search/
...which is essentially a "virtual" page that is displaying a different Template in the Views folder of my project. The following page does actually exist as a node in Umbraco...
/browse-books/catalogue/
...which is the top-level of our book catalogue (a full listing of titles).
The View that is displayed under the hijacked route ("/search/") has a Html.RenderPartial command to render a partial view that contains a search form with associated SurfaceController.
In the SurfaceController the ActionResult (on submission of the search form) has the following...
[HttpPost]
public ActionResult Submit(AdvancedSearch model)
{
return CurrentUmbracoPage();
}
...this is only temporary, to test functionality.
The problem I have is that the above command returns the View for the following page...
/browse-books/catalogue/
...and not...
/browse-books/catalogue/search/
...I assume because it not a "real" node? If I do...
return RedirectToCurrentUmbracoUrl();
...it works fine, but I lose the model state. How can I retain the model state in this scenario?
SurfaceController form in a page that has a hijacked route...
Hi guys!
I have an issue that I hope you can help me with. I have a hijacked route that is at the following location...
/browse-books/catalogue/search/
...which is essentially a "virtual" page that is displaying a different Template in the Views folder of my project. The following page does actually exist as a node in Umbraco...
/browse-books/catalogue/
...which is the top-level of our book catalogue (a full listing of titles).
The View that is displayed under the hijacked route ("/search/") has a Html.RenderPartial command to render a partial view that contains a search form with associated SurfaceController.
In the SurfaceController the ActionResult (on submission of the search form) has the following...
...this is only temporary, to test functionality.
The problem I have is that the above command returns the View for the following page...
/browse-books/catalogue/
...and not...
/browse-books/catalogue/search/
...I assume because it not a "real" node? If I do...
...it works fine, but I lose the model state. How can I retain the model state in this scenario?
Many thanks for your time, Chris
is working on a reply...