خرید بک لینک

Vote count: 0

i have attribute for filter route. when i submit a form i want redirect to another controller with a filter attribute. my filter attribute name is spam attribute . now i have a code for change route

 public override void OnActionExecuting(ActionExecutingContext filterContext)
    {
             filterContext.Result = new RedirectToRouteResult(new System.Web.Routing.RouteValueDictionary(new { controller = "Error", action = "Index", ErrorCode = System.Net.HttpStatusCode.BadRequest, Handler = "Controller" }));


        base.OnActionExecuting(filterContext);


    }

Now when i submit a form my filter is correct fine and i can redirect to Error controller but my page not change or not execute error page for me . And the problem is that the previous page stays

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 23 خرداد 1395 ساعت: 11:13

صفحه بندی