Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When I go to the following page:
There is a Buy Now button which makes a POST and updates a database. The problem is when I call RedirectToCurrentUmbracoPage, it redirects to http://localhost/products/product and complains that it is looking for a ProductViewModel, but I am passing it a RenderModel.
Product is just a placeholder in my site structure to hold virtual nodes and the part after product /23/red-crayon is part of a custom route. When I do a redirect, I would like to stay on the page with the query string. Is there a way to do it with RedirectToCurrentUmbracoPage (It does seem like this would redirect to /products/product since I am actually on a products page)
I have tried RedirectToCurrentUmbracoUrl and this does redirect to the current page with the url, but I wasn't sure if this was the correct way?
RedirectToCurrentUmbracoPage takes a string for queryString which I imagine will get you to where you want to go but maybe just not with the clean URL.
Alternatively you should be able to return new RedirectResult("/url"); and build the URL yourself?
So is RedirectToCurrentUmbracoUrl the same as RedirectResult(/url)?
Some years later..
RedirectToCurrentUmbracoPage("?id=" + MyId);
this will redirect with the desired query string
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted