Monday, November 3, 2014

Redirect to another web site from an an MVC Controller.

using System.Web.Mvc;
namespace Foo.Ui.Controllers
{
   public class BarController : Controller
   {
      public ActionResult Index()
      {
         return Redirect("http://www.example.com");
      }
   }
}

No comments:

Post a Comment