Support Forums
Help Please string to url - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: Help Please string to url (/showthread.php?tid=14934)



Help Please string to url - Friendly Ghost - 12-22-2010

Code:
Public Sub New()
  
    Me.acnt = 0
    Me.ctr = 1
    Me.masterctr = 0
    Me.loginurl = "http://www.youtube.com/create_account?next=/"
    
End Sub


I have set loginurl as string but in vb2010 its showing Error, that we cant set a url to string ? but i have done this before in vb 2008 .

and also its showing error when i create a new sub
Code:
Public Sub New()

End Sub

any help please ?


RE: Help Please string to url - Ownage - 12-22-2010

Hey for setting a string as a url just do

Code:
Dim sSite as string = "http://www.google.com/"
webbrowser1.navigate(sSite)

For the sub just do


Code:
Sub New()

End Sub



RE: Help Please string to url - KoBE - 12-22-2010

This should work for your url problem


Me.loginurl = New Uri("http://www.youtube.com/create_account?next=/")


RE: Help Please string to url - Thyonic - 01-03-2011

KoBE's solution should work, but I suggest that you do not use a WebBrowser under any circumstances. It's a very bad practice.


RE: Help Please string to url - thanasis2028 - 01-04-2011

I can't understand your problem. Can you please explain better what you are trying to do and post your full source?