473,545 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unusual Querystring parsing

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?

May 2 '06 #1
1 1327
Odd. Unfortunetly, you'll likely need to urldecode the query urself
(HttpUtility.Ur lDecode(...) and make use of hte Request.Url to get the
query). This also means you'll need to parse out the querystring yourself..

Karl

--
http://www.openmymind.net/

"Dunc" <du**********@g mail.com> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. .
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?

May 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1478
by: Fastly | last post by:
Hi Guys I'm no Javascript guru, although am fairly confidant using PHP... What I have knocked together here uses PHP to create a querystring without the iso=XX value, and dump it's output within some Javascript code. The reason for this script is to reload a page with their country settings (i.e. state for us but not for uk) on the form....
1
6727
by: lion | last post by:
my Problem: a query string passed into a html page doesn't display correctly on a mac I am just using html and javascript (no ASP, PHP or server side scripting) This is the query string: popup.html?pImage=30_leilani_dowding_b_060.jpg&ordRef=1000&Title=Leilani&nbsp;Dowding using the QueryString function below, the pImage variable should...
3
2053
by: Arjen | last post by:
Hello, Can somebody tell my if it is posible to create a QueryString encryption/decryption that works from a higher level then the code view... For example: I have an URL like www.mysite.com/index.aspx?id=123&print=no Must be changed to: www.mysite.com/index.aspx?2342342375675675676756
12
5277
by: Alex | last post by:
I have a question about determining if one QueryString keys exists. The idea is, if this key exists, than its presence is enough to indicate that its value is true. For example ... www.something.com/main.aspx?client Client is the QueryString, but no value is given. This would mean to me that client exists, so its value is true. In the code...
6
1698
by: duncan.welch | last post by:
Hi, I've got a website that uses links for page positioning which works great about 99% of the time. For some reason, 1% of the time I'll get an error when parsing the querystring, as it's reading the anchor name as part of the number. e.g. http://www.fluidstyle.co.uk/venuedetails.aspx?venueID=1964#review
5
1901
by: Me | last post by:
I was wondering if after parsing Querystring, I could initialize it. Is it possible? Thank you, -Me
2
1787
by: mosscliffe | last post by:
I am trying to create a back link, equivalent to the browser back action and I can not use java script. The target user does not allow java script. I am using HTTP_REFERER. I need to add the original Query String values. Is there a way to get the QueryString element other than by using cgi.FieldStorage, as I just want to return with...
3
2149
by: pingsheng | last post by:
Dear all, I have a form with dynamically created input fields. These fields go to next page for submitting into SQL database. The thing is all fields are the same but 4 fields. So each record must be submitted with a unique key, while everything is the same, these 4 fields must be different.... Idealy, these are the codes. please teach me...
2
3522
by: Infog | last post by:
Using this code, the display member of the combo box is displaying the text "System.Data.DataViewManagerListItemTypeDescriptor". Huh??? The first block of code gets the data from the database, and works as far as I know. The second block of code sets the first value of the form, and does NOT work like I want it too. I commented out the line...
0
7465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5969
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
701
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.