In my global asax file, I want to map a route, for example:
http://domain.com/add/link?url=http%3A%2F%2Fgoogle.com
And then catch it with my LinkController with the Add action.
I'm doing it?
global.asax →
routes.MapRoute( "AddLink", "Add/Link?{url}", new { controller = "Link", action = "Add" } );
LinkController →
public string Add(string url) { return url;
?? This does not work. What am I doing wrong? Thanks!
asp.net-mvc asp.net-mvc-2
Ian davis
source share