asp.net-mvc-routing

AreaActionLink Extension Method and namespace bug?

I wanted to add an extension method to the HtmlHelper class so that developers could generically retrieve and AreaActionLink<T> without having to add the new { area = "MyArea" } each time as well as not have to specify a Controller. This all works well and good if I specify the namespace or put the namespace of the Area Controller in the...

ASP.NET MVC images and other static content url

I just edited my route for a user details page to look like this: routes.MapRoute( "UserDetails", // Route name "{controller}/{action}/{id}/{title}", // URL with parameters new { controller = "Users", action = "Details", id = UrlParameter.Optional, title = UrlParameter.Optional } // Parameter ...

simple MVC form post and url routing question....I hope.

I have a view called Associations that has a drop down list and a button. When the user selects an option and presses submit, I want them to go to Association/{associationKey}. Association needs to work on get and post. Currently, with the code below, when the form is posted, it DOES go to Association and displays the correct record, ...

MVC routing not ignoring routes

I've seen numerous blog posts that indicate that, to use ASP.NET Webforms within an MVC application,simply add a line like routes.IgnoreRoute("{resource}.aspx/{*pathInfo}"); to the RegisterRoutes routine, and the aspx files will be ignored and served up in the conventional manner by IIS. However, it's not working. We are...

Get the generic controller type in controllerfactory

I have registered a new route like this context.MapRoute( "Dashboard_default", "Dashboard", new { action = "Index", controller = "Dashboard`1" }, new[] { "SomeNamespace.Controllers" } ); This route makes my CreateController method in my StructureMapControllerFactory to fa...

where to check if user is login and how to prevent not login users to enter to the admin section

i have route all admin controllers to "admin folder", but i want to check if the user is login and if not to give him login view. for the not login user i want to let him enter just the "website" controller where i need to check it? public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("elmah.axd")...