Solved

Passing string with " ' " causes error

Posted on 2012-04-11
1
271 Views
Last Modified: 2012-04-11
When I select a string with " ' "  , causes an error in the receiving aspx page.

For example names with " '" like O'hare, O'toole results to an error. How would I parse it?

The error happens when I pass it to the next page using Response Redirect and add the string as a parameter.
0
Comment
Question by:zachvaldez
1 Comment
 
LVL 38

Accepted Solution

by:
PaulHews earned 175 total points
ID: 37832820
You have to url encode the value of the parameter

Response.Redirect("MyPage.aspx?Name=" & Server.UrlEncode("O'Brian"))
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

914 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now