Whats the point of HttpUtility.UrlDecode when .net already decodes the querystring when you request it.
Is this a hangover from classic ASP or am I missing something?
Whats the point of HttpUtility.UrlDecode when .net already decodes the querystring when you request it.
Is this a hangover from classic ASP or am I missing something?
It is needed in case you received UrlEncoded data from other sources then querystring.
It could be useful when you are getting content from another source which does not decode the data itself, as well. It is true that it is generally not needed, yes; but when it is needed, it's nice to have a Framework-level function that works as the complement to HttpUtility.UrlEncode
(as a side note; I may be remembering wrong, but I don't think I used UrlDecode much in classic ASP, either.)
It can be used for a variety of things. Such as, the user submits a form where one of the fields contains a url to another website. Before displaying it you want to make sure it's decoded so that it displays "nicely".