OK so I have this WebBrowser1 and Button1 controls.

After you click Button1, program will access website, takes some HTML data, removes unwanted HTML tags and then WebBrowser1.Navigate("about:blank") + writes my HTML to the blank page.

Everything works great until.... Until you click the button 2nd time. Then you'll get just an empty page - with nothing in it.


I added a TextBox1 to see if the program gets HTML code 2nd time and yes, it's there. The only problem is that WebBrowser refusing to add my code to the page after 1st click.

Any thoughts? Thanks

I added "WebBrowser1.Stop()" thingy at the end of my Button code and it ... kinda ... works. Only thing is that it actually ADDS html content to the previously loaded content. :-/

FIXED.

Had to add couple of Stop and Refresh commands at the beginning and end of my code - not very pretty but works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.