473,508 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB.NET: Escaping special characters

5 New Member
Hello,

I am getting javascript errors when there are " and/or page breaks in the data bound to my grid. Used the following code:

Regex.Replace(str, Regex.Escape("\n"), ""); -- the same with the "

I no longer encounter the javascript error but the double qoutes(") are also being removed :(

What can I do?
Mar 9 '09 #1
1 4390
autessa
5 New Member
Found it. I replaced the double quote with two single quotes. Dunno if there're other ways around this.

Here's the link: http://bytes.com/groups/net-vb/368544-escape-character
Mar 9 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
8955
by: Roy W. Andersen | last post by:
I've been searching google about this for days but can't find anything, so I'm hoping someone here can help me out. I'm trying to create zip-files without needing the zip-file extension in PHP,...
0
2563
by: Simon Hawkins | last post by:
Just wondering... ... Is there a class or method in the API that will automatically 'escape' all the HTML special characters in a String, or a file? Something like the 'URLEncoder' class where the...
4
5241
by: Ewok | last post by:
let me just say. it's not by choice but im dealing with a .net web app (top down approach with VB and a MySQL database) sigh..... Anyhow, I've just about got all the kinks worked out but I am...
3
1275
by: MAF | last post by:
Is there a quick way to convert all special characters to XML format for example '&' to & or '+' sign to ? ?
17
30632
by: Carl Mercier | last post by:
Hi, Is it possible to use special characters like \n or \t in a VB.NET string, just like in C#? My guess is NO, but maybe there's something I don't know. If it's not possible, does anybody...
0
1500
by: SeanGerman | last post by:
Howdy, Is there a way to explicitly escape special characters (particularly & (&) and ' (')) when writing a data set with the WriteXml method? I know this is supposed to happen...
4
84994
by: James Black | last post by:
I have an application that relies on JSON, and I realized yesterday that I when the user types at least some of these characters (most likely all, haven't had time to verify) that the parser has...
1
2368
by: =?Utf-8?B?bWljaGFlbHJp?= | last post by:
We are dynamically changing the title property of nodes in our sitemappath to reflect the names of products by handling the SiteMapResolve event. We have some unicode characters in our product...
7
4101
by: wannymahoots | last post by:
optparse seems to be escaping control characters that I pass as arguments on the command line. Is this a bug? Am I missing something? Can this be prevented, or worked around? This behaviour...
0
7125
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...
0
7388
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...
1
7049
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...
0
5631
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
3199
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...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
767
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
422
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...

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.