Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 6th, 2004, 08:42 AM
Registered User
 
Join Date: Sep 2004
Location: London, , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Limitations of Replace

Hi

I need to turn the string below into an asp variable, however, when I try to remove the double quotes using the Replace function, I get an error message as the quotes in the middle seem to confuse matters. The line itself is generated by an external program and cannot be altered, all I can do is wrap around it.


<a href="XXX_X082401.ppt" target="_top">01 The Main Strategic Agenda</a>

Thanks in advance (hopefully)

Phil
  #2 (permalink)  
Old September 6th, 2004, 01:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Phil,

Cross post at http://p2p.wrox.com/topic.asp?TOPIC_ID=18758

Why do you have to post this in more than one forum? It is enough that it is posted on the best fit forum. I don't see any need in posting that under ASPXBeginners' forum at all.

How about constructing this string with single quote?
<a href='XXX_X082401.ppt' target='_top'>01 The Main Strategic Agenda</a>

That way you wouldn't face this problem. Else you will have to construct that string with DOUBLE double quotes, that results in this.
<a href=""XXX_X082401.ppt"" target=""_top"">01 The Main Strategic Agenda</a>

In that case you don't need to replace anything.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
  #3 (permalink)  
Old September 7th, 2004, 04:01 AM
Registered User
 
Join Date: Sep 2004
Location: London, , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

happygv

It was posted in two forums by mistake, first time on here.

I am trying to change the double to single quotes, but the line cannot be manually re-written, that was the whole point of the query...

  #4 (permalink)  
Old September 7th, 2004, 07:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Code:
newstring=Replace(yourstring, """", "'")
  #5 (permalink)  
Old September 7th, 2004, 09:36 AM
Registered User
 
Join Date: Sep 2004
Location: London, , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Pgtips,

My problem is with the replace function. What you refer to as yourstring has double quotes in the middle of it. This causes a compilation error as it assumes the second set of quotes are the end of the statement, not part of the string itself.

My question is, and always has been, how do I get round that?

  #6 (permalink)  
Old September 10th, 2004, 10:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Just checked the replies in your other post too. The information you supplied seems to be insufficient. Where do you read this "<a href=.....>" from? can you explain on that?

_________________________
- Vijay G
Strive for Perfection
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Limitations rfurman1161 Access 2 April 5th, 2006 01:45 AM
Forum Features and Limitations englere BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 10th, 2006 12:37 PM
Limitations of Replace philstaite ASP.NET 1.0 and 1.1 Basics 6 September 8th, 2004 01:16 PM
MSAccess Limitations if any happygv Access 5 April 19th, 2004 08:45 PM
data type limitations trangd MySQL 0 October 16th, 2003 11:34 AM



All times are GMT -4. The time now is 03:29 PM.


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