views:

221

answers:

4

I am new to ASP.NET MVC. I am getting an error when i use these characters - *#%":?<> - in URL.

My question is - Does ASP.NET MVC handle *#%":?<> characters in the URL?

A: 

Take a look at this.. While it does not solve the problem, at least you know you are not alone :)

bh213
A: 

Look over here: http://www.w3schools.com/TAGS/ref_urlencode.asp

If you want the chars to be transferred as plain chars, you have to encode them, as they have a meaning in urls.

Dykam
+1  A: 

RFC 1738:

Thus, only alphanumerics, the special characters "$-_.+!*'(),", and reserved characters used for their reserved purposes may be used unencoded within a URL.

Of the characters you listed, only * " and - can theoretically be used unencoded. In practice, many sites would encode all the characters you listed.

Matthew Flaschen
+1  A: 

No, it does not work, even when you encode them.

It is a stupid limitation in ASP.NET.

They do work in the querystring part though, just not the path part.

leppie