This project is read-only.

RedirectToRoute from module to Orchard Home

Topics: Writing modules
Aug 10, 2011 at 12:18 AM

I'm sure this is really simple, but it seems to be escaping me at the moment...

In a controller for my module, how would I construct a RedirectToRoute() that simply takes me back to the Home page of the site? I tried using controller = "home" and action = "index", but I think I need the area parameter and I'm not sure what it would be. Thanks.

Aug 10, 2011 at 12:56 AM

Did you try Orchard.Core?

Aug 10, 2011 at 1:02 AM

Yep...that didn't work either. I can actually just do it with

return new RedirectResult("~/");
I don't need to specify and route parameters anyways. Thanks.

Aug 10, 2011 at 1:03 AM

Yes, that would work :)