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.

Thanks




Asp.net mvc html melper

1:



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
http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx#registering_routes_in_account_and_store_areas.
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

2:


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



70 out of 100 based on 70 user ratings 520 reviews