Hello! I have this simple Internet browser. It works “fine”, but I’d like part of the URL (most of it actually) to be predetermined (always same website, but different pages). For example, I want to be able to type only some middle part of the URL & then click "Go!" and be able to connect to particular webpage in same website.

Here is what I mean (just an example):


Instead of typing all these URLs, I want in the text box to type either "johnb" or ""steveu" or "karenk" or "michaelv" or whatever name/text can be and then be able to click "Go" and the code to automatically include what needs to be before these names/text and after as anything before and after always stays the same.

This is my web browser code:


Public Class Form1

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

End Sub

Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

End Sub

Private Sub GoBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GoBtn.Click

WebBrowser1.Url = New Uri(TextBox1.Text)

End Sub
End Class


Please help if you can. Thank you.


WebBrowser1.Url = New Uri(TextBox1.Text)


WebBrowser1.Url = New Uri("http://www.somesite.com/" & TextBox1.Text & "/profile/info.html")

I ran this pointing to a real website and it worked just fine.

Provides short but perfect solutions
This question has already been answered. Start a new discussion instead.