Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pass a url string as parameter to mvc controller

Tags:

asp.net-mvc

I need to pass a full website url to my controller action, like this:

http://myweb/controller/action/http://blabla.com/dir2

how to create a new route for passing this parameter to action?

like image 863
mhmd Avatar asked Apr 04 '09 17:04

mhmd


1 Answers

routes.MapRoute("Name", "{controller}/{action}/{*url}");

Additional Info:

  • ASP.NET MVC In-Depth: The Life of an ASP.NET MVC Request
like image 200
Konstantin Tarkus Avatar answered Sep 28 '22 03:09

Konstantin Tarkus