Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complicated Replace Function - Please help

Status
Not open for further replies.

CrimsonDiva

Programmer
Sep 22, 2000
30
US
Hi,

I'm trying to excute a vbscript Replace function to produce a printable version of an ASP page. Here's what I have:

strLine = Replace(strLine, &quot;<%=Application(&quot;&quot;rootsite&quot;&quot;)%>&quot;,&quot;

But this doesn't work and I've narrowed down the problem to trying to convert %> into a string. The code works fine like this:

strLine = Replace(strLine, &quot;<%=Application(&quot;&quot;rootsite&quot;&quot;)&quot;,&quot; -- missing ending %>

But that's not what I want. Basically, how do I get vbscript to see '%>' as a string? [morning]
 
not sure what and why you need to do that but chr() codes will give you the % and >

you know you cannot have asp tags with in asp tags?!? right? _________________________________________________________
for the best results to your questions: FAQ333-2924
[sub]01001111 01101110 01110000 01101110 01110100[/sub]
onpnt2.gif
[sup] [/sub]
 
Break up the starting tag in your script:
Code:
strLine = Replace(strLine, &quot;<&quot; & &quot;%=Application(&quot;&quot;rootsite&quot;&quot;)&quot;,&quot;[URL unfurl="true"]http://www.somesite.org&quot;,1,-1,1)[/URL]

-Tarwn
[sub]01010100 01101001 01100101 01110010 01101110 01101111 01101011 00101110 01100011 01101111 01101101 [/sub]
[sup]29 3K 10 3D 3L 3J 3K 10 32 35 10 3E 39 33 35 10 3K 3F 10 38 31 3M 35 10 36 3I 35 35 10 3K 39 3D 35 10 1Q 19[/sup]
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top