So, I called Controller in MVC2 that way, and I got access to the classic querystrings just fine. Note that the second parameter thing2 is already URLEncoded, and again getting URLEncoded querystring and URLDecoding is not a problem. My example looks like this ...
http://mydomain.com/controller?thing1=1544&thing2=somethingURLEncoded
Now I'm trying to switch to the MVC2 ASP.Net way of handling parameters and make myself a nice custom MapRoute. I am testing it to see that it works with a simple test ...
http://mydomain.com/controller/Index/1544/999
I am successfully debugging the VS2010 step inside my Index method inside my controller!
Then I decided to take the next step and change the last URL parameter to URLEncoded ...
http://mydomain.com/controller/Index/1544/somethingURLEncoded
The problem that I see after doing this in my browser is that it is almost similar to MVC2. ASP.Net automatically addresses URLDecoding before I enter my Index method inside my controller.
What gives? I thought that I could first log into the controller, and secondly, make my own URL. Since the original data was encrypted by AES and had slashes in it .. before my parameter is premature, URLDecoding is not a side effect that I can schedule.
Please, help.
source
share