Webbrowser http://???

Hi, I have a webbrowser i made but when you dont put in the http:// by yourself it doesnt go to the webpage...Is there a way to make it place (http://) or (www.) in front IF IT DOESNT have it already.



Answer this question

Webbrowser http://???

  • Kimbe

     

    Try this:

     WebBrowser1.Navigate(URL)


     

    System.Windows.Forms.WebBrowser.Navigate(ByVal urlString As String)

    not uri



  • General Fault

    Dim Url as string = "foo.com"

    If not Url.Contains("www.") then Url = "www." + url

    If not Url.Contains("Http"//:") then Url = "Http"//:" + url



  • lori1171963

    Ok, Now the Format of the URI cant be determined.

    Whats typed into the Text Bar "apple.com"

    Code Used:
    Private Sub cmdGo_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdGo.Click
    Dim Url As String = txtSite.Text

    If Not Url.Contains("www.") Then Url = "www." + Url

    If Not Url.Contains("Http""//:") Then Url = "Http""//:" + Url
    WebBrowser1.Navigate(New System.Uri(txtSite.Text))
    End Sub


  • Webbrowser http://???