If your concern is to let the user edit the html document loaded in the WebBrowser control, then here is an easy solution.
You can customize this, but for this example, add a TextBox (multiline), three Buttons and a WebBrowser control to a Form and the following code:
'' This is to let us work with objects easily, without the need of lots of CType and DirectCast
Option Strict Off
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'' replace with your url
WebBrowser1.Navigate("http://www.google.com")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'' you get the HTML of the webbrowser back
TextBox1.Text = WebBrowser1.DocumentText
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'' this is just a generic way for example only.
'' You may want to give option buttons instead of asking user to type tag name.
Dim elementTag As String = InputBox("Enter the TAG for HTML element you want to add:", "Add Element")
If Not String.IsNullOrEmpty(elementTag) Then
Dim childControl = WebBrowser1.Document.CreateElement(elementTag)
childControl.InnerHtml = "Your " & elementTag & " control..."
WebBrowser1.Document.Body.InsertAdjacentElement(HtmlElementInsertionOrientation.AfterBegin, childControl)
childControl.Focus()
End If
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
' To turn On the edit mode.
Dim axObj As Object
axObj = WebBrowser1.ActiveXInstance
axObj.document.designmode = "On"
End Sub
End Class
Now clicking the Button1 will load your document in the WebBrowser control for editing.
Clicking Button2 will get you the HTML of current (edited) document in the WebBrowser.
Clicking Button3 will help you add new elements to the HTML document.
Hope this helps :)