Use Slashes In UrlRouting?

Jun 16, 2010

I'm using UrlRouting in my app which is an ecommerce application. My Urls are configured as /shop/{ProductCategory}/{ProductName} I would like to use / character in the product category section so that I can show category/subcategory hierarchies e.g. /Electronics/Media-Players/ in this case this whole thing is the category but when I use it like this my current logic is thinking "Media-Players" is the product name. Is there a way to use slash characters in UrlRouting within a field?

View 6 Replies


Similar Messages:

MVC :: Routes Not Picking Up With Another HttpModule Before The UrlRouting Module?

Jan 15, 2010

I have integrated MVC into an existing web forms application which is an in house CMS system. There are two HttpModules. The first one is part of the in house CMS system and does url routing (for the web form pages) along with other required actions. The system creates routes from records in the database and if the page is an MVC Controller, the first HttpModule that belongs to CMS system does not do any more routing and the UrlRouting module should find the route and handle it. Locally it all appears to work fine with the built in Visual Studio debugger webserver. However when published up to remote webservers, all MVC pages result in a 404...even statically created routes on application startup. At the moment, the external webserver does note have remote debugging enabled so I'm stuck there. I am assuming it's related to the multiple HttpModules since standalone MVC applications do work fine on the remote webservers.

View 3 Replies

Web Forms :: SiteMapPath With UrlRouting Not Working On Dynamically Generated Routes VB

Feb 28, 2011

I am learning .net and I have implemented SiteMapPath on a site i'm developing which uses Url Routing. It is working fine for static routes but i am trying to get it to work on a dynamically generated route that passes a {date} and a {title} but I can't find any information on it anywhere, I have a book but it doesn't go in to SiteMapPath with UrlRouting.

I have set up routes in Global.asax file:

[Code]....

My web.sitemap currently looks like:

[Code]....

View 1 Replies

VS 2008 Putting Date Slashes In Textbox For Input?

Mar 3, 2010

I'm using a textbox in my asp.net project with a date extender to allow someone to enter a date. If they want to type in a date rather than select from the calendar, how can i include the slashes in the textbox for the person to enter the date as shown? such as __/__/____

View 3 Replies

Search Page MVC Routing (hidden Action, No Slashes, Like SO)?

Feb 22, 2011

I want my searches like those in Stack Overflow (i.e. no action, no slashes):

mydomain.com/search --> goes to a general search page
mydomain.com/search?type=1&q=search+text --> goes to actual search results

My routes:
routes.MapRoute(
"SearchResults",[code]....

The search results route does not work. I don't want to use the ".../..." approach that everyone seems to be using, because a search query is not a resource, so I want the data in a query string as I've indicated, without slashes--exactly like SO does.

View 1 Replies

MVC :: Automatically Adding Slashes To End Of ActionLink (and Similar) Link Builders?

Apr 20, 2010

By default, links are created without the forward slash suffixed to the end. It is per our company standards to always have this trailing slash. Is it possible, via a configuration or whatever, to automatically have a forward slash whenever these methods are called?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved