PC Review


Reply
Thread Tools Rate Thread

Code advice: Add target='blank' to html string...

 
 
VB Programmer
Guest
Posts: n/a
 
      7th Aug 2005
I have a long html string I get from a rich text editor.

How do I append "target='_blank' to all occurrances of "<A href=..." in the
long html string easily?

Is there an easy way, or do I have to go thru the string bit by bit and
replace it using string functions?

Thanks.


 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      7th Aug 2005
String.Replace("<A", "<A target='_blank'") -- it's not perfect, but it might
get close to what you're looking for.

-Brock
DevelopMentor
http://staff.develop.com/ballen



> I have a long html string I get from a rich text editor.
>
> How do I append "target='_blank' to all occurrances of "<A href=..."
> in the long html string easily?
>
> Is there an easy way, or do I have to go thru the string bit by bit
> and replace it using string functions?
>
> Thanks.
>




 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read HTML code into c# program, store in string amitM Microsoft ASP .NET 2 22nd Sep 2010 09:04 PM
How to get a string from a html source code? Luk Microsoft VB .NET 4 8th Mar 2007 10:35 PM
HTML code in textbox then string gn@dana.ucc.nau.edu Microsoft VB .NET 2 21st Mar 2006 10:00 PM
Outlook 2002 - sending HTML code in body of mail, shown as HTML code on receiver end. Trygve Lorentzen Microsoft Outlook 1 20th Apr 2005 11:52 AM
Blank lines in HTML code John Microsoft Frontpage 6 12th May 2004 04:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 PM.