In my global asax file, I want to map a route such as this:
http://domain.com/add/link?url=http%3A%2F%2Fgoogle.com
And then catch it using my LinkController with action called Add.
Do I do this?
global.asax->
routes.MapRoute(
"AddLink",
"Add/Link?{url}",
new { controller = "Link", action = "Add" }
);
LinkController->
public string Add(string url)
{
return url; // just want to output it to the webpage for testing
}
?? That doesn't seem to work. What am I doing wrong? Thanks!