RedirectToCurrentUmbracoPage fails in SurfaceController of PartialView
I have a form in a partial view that works almost as it should. I am able to get the data from the form and update the database via a SurfaceController. My final step is to reload the Umbraco page.
I've tried
return RedirectToCurrentUmbracoPage();
but it results in this error:
Cannot find the Umbraco route definition in the route values, the request must be made in the context of an Umbraco request
I can however redirect to a specific page but that means hard coding the page id:
return RedirectToUmbracoPage(2097);
How can I get the id of the current page or cause the page to reload correctly?
please verify that you global.asax file inherits from umbraco app, default.aspx is umbraco file and inherits from umbraco.UmbracoDefault. in your web.config UrlRewriteModule and UmbracoModule is first modules in httpmodules sections.
Do you run web site from IIS or IIS express or from Visual Studion host ?
RedirectToCurrentUmbracoPage fails in SurfaceController of PartialView
I have a form in a partial view that works almost as it should. I am able to get the data from the form and update the database via a SurfaceController. My final step is to reload the Umbraco page.
I've tried
but it results in this error:
I can however redirect to a specific page but that means hard coding the page id:
How can I get the id of the current page or cause the page to reload correctly?
What version of Umbraco you are using? Are you using Ajax post ?
Umbraco 6.1.6
Doing a standard form submit.
please verify that you global.asax file inherits from umbraco app, default.aspx is umbraco file and inherits from umbraco.UmbracoDefault. in your web.config UrlRewriteModule and UmbracoModule is first modules in httpmodules sections.
Do you run web site from IIS or IIS express or from Visual Studion host ?
web.config confirmed
IIS
is working on a reply...