Unusual Querystring parsing

D

Dunc

I have a site with a number of pages that make use of an ID and an
anchor in the querystring (e.g.
www.mysite.com/news.aspx?NewsTypeID=7#NewsID_49).

For some reason, when it's visited by a search engine, it's replacing
the hash with a %23 and asp.net is only seeing one parameter, which
results in a number format error when trying to read the NewsTypeID.

Is there a simple way I can force asp.net to URLDecode the querystring
before trying to read it?
 
K

Karl Seguin [MVP]

Odd. Unfortunetly, you'll likely need to urldecode the query urself
(HttpUtility.UrlDecode(...) and make use of hte Request.Url to get the
query). This also means you'll need to parse out the querystring yourself..

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top