Handling a specific route with ASP.NET MVC -



Handling a specific route with ASP.NET MVC -

i have asp.net mvc 4 app users beingness directed links in email. users visiting 1 of next links:

http://my-site.com/view-name http://my-site.com/#/view-name

the difference between 2 add-on of '#'. need both of these urls homecoming same view. how do in asp.net mvc 4. one-off situation. reason, i'm trying figure out quickest solution.

thank much help!

you can have multiple routes patterns in route config file.

routes.maproute( name: "defaultroute1", url: "{controller}/{action}/{id}", defaults: new { controller = "home", action = "index", id = urlparameter.optional } ); routes.maproute( name: "defaultroute2", url: "{controller}/#/{action}/{id}", defaults: new { controller = "home", action = "index", id = urlparameter.optional } );

http:// localhost/home/index

http:// localhost/home/#/index

both returns same view.

asp.net-mvc

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -