yad4u RedirectToAction for areas?

RedirectToAction for areas?

I have setup some areas, but I'm not sure how to Redirect to them via the RedirectToAction method. There doesn't seem to be any Area parameter I can feed it.


Asp.net mvc html melper


Proper way to build a data Repository in ASP.NET MVC
You will need to use RedirectToRoute if you are trying to redirect to an ActionResult outside the current area.

Why use TagBuilder instead of StringBuilder?
You will first want to make sure you have a route to the ActionResult you would like to redirect to registered for your area.

Difference between HtmlTable and TagBuilder(“table”)
The following article is helpful for this:.
Detect whether or not a specific attribute was valid on the model
How to get parameters out of an ascx back to the main aspx page
Once you have routes in place, you can do return RedirectToRoute("MyRouteName");.
Display Friendly Date, Numbers [duplicate]

Maintaining the query string in ASP.Net MVC


This will work too:.
return RedirectToAction("ActionName","ControllerName", new { area = "AreaName" }); 

70 out of 100 based on 70 user ratings 520 reviews