473,408 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Url and querystring reading

I have an asp.net page that sends a querystring to a new web page (see full
url below). The querystring takes a filename as one of the parameters. The
problem I am having is when the filename contains a "&" then when I read the
querystring it doesn't read past the embedded "&". Any way around this?
Thanks.
David

http://server/Fileroom/frmSubfolder..../No%20File%20#)

The value in the sname querystring is "Quarles & Brady (Misc./No File #)"
Apr 4 '08 #1
4 1129
all querystring args are supposed to be urlencoded. see:

HttpUtility.UrlEncode
-- bruce (sqlwork.com)
"David C" wrote:
I have an asp.net page that sends a querystring to a new web page (see full
url below). The querystring takes a filename as one of the parameters. The
problem I am having is when the filename contains a "&" then when I read the
querystring it doesn't read past the embedded "&". Any way around this?
Thanks.
David

http://server/Fileroom/frmSubfolder..../No%20File%20#)

The value in the sname querystring is "Quarles & Brady (Misc./No File #)"
Apr 4 '08 #2
Check out this article concerning URLEncode:
http://www.codeproject.com/KB/aspnet/QueryString.aspx

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
"David C" <dl*****@lifetimeinc.comwrote in message
news:ea**************@TK2MSFTNGP04.phx.gbl...
>I have an asp.net page that sends a querystring to a new web page (see full
url below). The querystring takes a filename as one of the parameters.
The problem I am having is when the filename contains a "&" then when I
read the querystring it doesn't read past the embedded "&". Any way around
this? Thanks.
David

http://server/Fileroom/frmSubfolder..../No%20File%20#)

The value in the sname querystring is "Quarles & Brady (Misc./No File #)"


Apr 4 '08 #3
Sweet. Thanks Bruce!
Apr 4 '08 #4
Thank you all. I knew there had to be a simple solution.
David
"David C" <dl*****@lifetimeinc.comwrote in message
news:ea**************@TK2MSFTNGP04.phx.gbl...
>I have an asp.net page that sends a querystring to a new web page (see full
url below). The querystring takes a filename as one of the parameters.
The problem I am having is when the filename contains a "&" then when I
read the querystring it doesn't read past the embedded "&". Any way around
this? Thanks.
David

http://server/Fileroom/frmSubfolder..../No%20File%20#)

The value in the sname querystring is "Quarles & Brady (Misc./No File #)"


Apr 5 '08 #5

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

Similar topics

7
by: Robb Meade | last post by:
Hi all, A recent project that I had finished and went live with no apparant problems. My client received an email from a user who mentioned that by accident they had been typing (over the...
2
by: Jim via DotNetMonster.com | last post by:
Hi, I'm passing a variable to another page through a querystring. I then want to use that variable to retrieve records from a database to poulate a dropdownlist. I can read the variable from the...
5
by: Vishwanathan Raman | last post by:
I have only one page.Its a search results page.Depending on the component selected in the results page the search is initiated. I am using QueryString to send me details pertinent to search.But I...
2
by: Helter Skelter | last post by:
hi, i'm not sure if this has something to do with c# or ASP.NET but i'd like to know how to use a querystring. i have a webpage that i can translate but i dont want to make seperate pages for...
7
by: fox | last post by:
Hi, Lacking javascript knowledge, I just realized why my project has a bug. I am using ASP to loop through a set of records while it creates URLs with a querystring that has a single value pair....
3
by: Alex Schatten | last post by:
Hi in ASP i used following code for reading the Request.QueryString and setting my variables for each key in Request.QueryString x= key & "=" & chr(34) & Request.QueryString(key)& chr(34) ...
6
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...
4
by: | last post by:
Hi all, If I am reading this right, then the querystring parameters must be "&amp;" and not "&". However, IIS 6.0 and asp.net request.querystring fails to capture the values if "&amp;" is specified....
3
by: =?Utf-8?B?ZGlzcGxheW5hbWU=?= | last post by:
I have an ASP page with a button and other things. When the button is clicked, it executes a javascript function which does: document.Form1.method = 'post'; document.Form1.action =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.