Solved

Passing string with " ' " causes error

Posted on 2012-04-11
1
270 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 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

19 Experts available now in Live!

Get 1:1 Help Now