Click here to Skip to main content
15,843,200 members
Please Sign up or sign in to vote.
2.04/5 (4 votes)
See more:
i can't believe there's no way to delete some element from page that my application is web browser load it it?

for example, i add on my application,

1 - button

1 - webbrowser

application on load navigate to example.com/example.html

and that page contains :
HTML
<div id="hello"></div>

now when page loaded, when i click on button, it deletes that node only. is there any way?

(please don't tell me to delete that using that element id. i want to do that without using id. i believe there's a way to do that)

Thanks.
Posted
Comments
Debabrata_Das 22-Jun-14 11:19am    
Hello friend, could you please share your code changes so that we understand your question?
- DD
Member 10749093 22-Jun-14 12:02pm    
hi friend. i have code

Dim Rstring As String = WebBrowser1.Document.Body.InnerHtml

Rstring = Replace(Rstring, "Hello", "Hi")

WebBrowser1.Document.Body.InnerHtml = Rstring

that code replace "hello" to "hi" which is on page on webbrowser but i want to write the html code on that "hello" is place. then i be able to replace the code with something like, another code or maybe word.
Debabrata_Das 23-Jun-14 2:18am    
Ok, so you can write something like,
Rstring = Replace(Rstring, "<span>Hello</span>", "Hi")
In this case, I've written HTML tag instead of plain text and this should also work. Are you facing any challenge while doing so?
Member 10749093 23-Jun-14 3:57am    
i have tried that using html tags. but didn't work. it only works when i write text only

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900