?
Solved

Passing special characters in query string

Posted on 2005-04-21
1
Medium Priority
?
554 Views
Last Modified: 2010-04-07
Hi

I occasionally pass error messages to an asp.net page via the query string via a vb .net program.

Sometimes the error messages dont get through due to certain characters in the query string.

How could i pass these special characters across without messing up the query string (eg an error message containing an '&')

or

If anyone has a better way to pass data to an ASP .net page please tell.

Thanks
Adam
0
Comment
Question by:adam_pedley
1 Comment
 
LVL 3

Accepted Solution

by:
nathanhawes earned 2000 total points
ID: 13840215
Try encoding and decoding the querystring before sending.

Like Server.HtmlEncode(message)... then Server.HtmlDecode(message).

Remember don't encode and decode the ENTIRE querystring as it will rewrite your &'s (among other things) thus render your querystring code useless.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question