I would like to make my app url like http://domain.com/product/product-name....
Is it possible that is if I am passing productid and can get productname in my url?
I would like to make my app url like http://domain.com/product/product-name....
Is it possible that is if I am passing productid and can get productname in my url?
URL Rewriting is the practice of "faking" a URL by rewriting it to look like another URL. It does so in a single direction. This means it is has no built-in way to generate a URL for use on the UI.
.NET Routing is what MVC applications typically use. It is a real, not faked 2-way mapping from URL to a set of route values and/or a set of route values to a URL. This means that you can easily generate URLs for use within the application using HTML helpers such as ActionLink, and as such is the recommended and preferred approach for building custom URLs from within the application.
Sometimes both of these techniques are used, but URL rewriting is generally only put in place to do things that make sense to change from outside of the compiled application, such as when nesting the application within another application or putting in one-way 301 redirects for legacy URLs.
To answer your question, yes it can be done, but should be done with .NET routing, not URL rewriting. To use names like this, you need a mapping between name and ID. A couple of ways this could be done:
GetRouteData and GetVirtualPath methods.