Url.Action or filterContext.Result = new RedirectToRouteResu

Posted by Community Admin on 04-Aug-2018 03:41

Url.Action or filterContext.Result = new RedirectToRouteResult(new RouteValueDictionary { { "controller", ControllerString }, { "action", ActionString } }); does not work

All Replies

Posted by Community Admin on 31-May-2013 00:00

Hi. When I use Url.Action or filterContext.Result to return the relative path Sitefinity returns/rewrite the defualt to Sitefinity/Themes?controller=controllername&action=actionname. Any ideas of to what is causing this? Is there a simple way to have a URL with the following format: /controllername/actionname everytime I use Url.Action in the controller of filterContext.Result.
Thanks.

Posted by Community Admin on 03-Jun-2013 00:00

Hello Andrew,

Thank you for contacting Sitefinity support.

 Url.Action or filterContexts.Result with the route you create with

new RouteValueDictionary "controller", ControllerString , "action", ActionString

will give you the /pageurl/actioname route because that is how Sitefinity MVC widgets work - the controller name is replaced by the page name. 
Still, I cannot reproduce the result which you reported, so I would like to ask you for more details like description of the widget setup, the code of the widget so i would be able to set it up here and explore it in details, and everything else which you think might be useful.
We are waiting for your input so we would be able to give you some more details as soon as possible.


Regards,
Ivan
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed