1
0
mirror of https://github.com/rudollee/LearningMVC.git synced 2025-06-07 16:06:21 +00:00
2017-04-13 03:19:09 +09:00

19 lines
451 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace ControllersAndActions.Infrastructure
{
public class CustomRedirectResult : ActionResult
{
public string Url { get; set; }
public override void ExecuteResult(ControllerContext context)
{
string fullUrl = UrlHelper.GenerateContentUrl(Url, context.HttpContext);
context.HttpContext.Response.Redirect(fullUrl);
}
}
}