Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
| Search | Today's Posts | Mark Forums Read
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 19th, 2005, 02:21 PM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript && keeps turnig into &&

I just joined a team working on a large-scale VB.NET/ASP.NET app and I have an issue: when I am using VB.NET to spit out some Javascript, my ampersands won't stay as ampersands once the page is generated - they turn into & instead. Is there any way to force those ampersands to stay as plain ol' & signs?
  #2 (permalink)  
Old May 19th, 2005, 02:52 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Are you writing the javascript to a control attribute? .NET escapes out certain characters when you put them in attributes. I'd suggest moving the javascript into the head of the page or a .js file in a function, and put the function call in the attribute. Depending on how much this chunk is repeated this will also help to optimize the html weight.

-Peter
  #3 (permalink)  
Old June 27th, 2005, 02:09 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Peter,

Do you know of any 'escape sequences' that can be used to tell .NET, “See here! I meant what I [u]said</u>!”?
  #4 (permalink)  
Old June 27th, 2005, 03:34 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Not off hand. Can you post the code for this problem? There might be another fix depending on what you are doing with the code.

-Peter


Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript & XML & NN lmod Javascript How-To 0 August 18th, 2005 03:16 PM
send & recive mails from exchange & lotus sever zaheersharief Pro VB 6 1 May 16th, 2005 06:55 AM
Linux & KDE & C++ & QT & MYSQL & Kdevelop Munnnki Linux 0 January 2nd, 2005 05:41 PM
XML from a DB recordset (removal of &lt;&gt;) Thodoris XML 3 July 13th, 2004 12:28 AM
sql & join tables & find a field in multiple table trangd Beginning PHP 2 January 29th, 2004 07:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.