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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Browser control in VB 2005

Status
Not open for further replies.

bclt

Programmer
Mar 13, 2005
363
GR
I have a page that is displayed by the browser control.
The page's code is:
<a href="
The form (in the application) has also a button:
Code:
        Dim abc As String = WebBrowser1.DocumentText 'store in abc the source code
        abc = abc.Replace("hp", "<b>hp</b>") 'replacement
        [COLOR=red]WebBrowser1.DocumentText = abc[/color]

What it does when clicking is to replace "hp" with the "<b>hp</b>". When the command in red is executed I'll see in the browser the "hp" in bold mode.

The problem is that there will be a replacament at the link: " <a href=" ", and the link becomes: " <a href=" "

Of course as i click it, "Page not found" will be displayed in the browser.

=========

Is there any way to do the replacements everywhere APART FROM the links?

Hope u understand me.

Tnx
 
You could just have another replace statement after the first one to replace <a href=" with <a href="
--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top