HELP! Webbrowser Url to a textbox?
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts
Page 1 of 1
I am making a youtube view and sub checker (viewtopic.php?f=70&t=5617)
but the thing is If you where to navigate in the app then when you click the check button, It checks TextBox1.Text to see if it is a valid link, And not the url, so it will error: Incorrect Link. Anyone have any ideas?
i have tried stuff like Textbox1.Text = Webbrowser1.Url As String, but no luck
Any help is appreciated, Feel free to test out my app
Thanks
~Noobcake
but the thing is If you where to navigate in the app then when you click the check button, It checks TextBox1.Text to see if it is a valid link, And not the url, so it will error: Incorrect Link. Anyone have any ideas?
i have tried stuff like Textbox1.Text = Webbrowser1.Url As String, but no luck
Any help is appreciated, Feel free to test out my app

Thanks
~Noobcake
If i Help you +Rep cooll;
Im new to visual basic so I probly wont :P
Im new to visual basic so I probly wont :P
If you are Using a WebBrowser then on DocumentCompleted Event Add Code
TextBox1.Text=WebBrowser1.Document.Url.ToString
And to Check if its Valid URL use this
If TextBox1.Text.StartsWith("http://www.youtube.com/") then
WebBrowser1.Navigate(TextBox1.Text)
End If
Hope it Helps ;)
TextBox1.Text=WebBrowser1.Document.Url.ToString
And to Check if its Valid URL use this
If TextBox1.Text.StartsWith("http://www.youtube.com/") then
WebBrowser1.Navigate(TextBox1.Text)
End If
Hope it Helps ;)
Eh? try this:
Code: Select all
If thats not it try this:WebBrowser1_DocumentCompleted...
TextBox1.Text = WebBrowser1.Url.ToString()
Code: Select all
btnGo_Click...
If Not TextBox1.Text.Contains("http://www.youtube.com/watch?v=") Then
MsgBox("Not valid url!")
Else
WebBrowser1.Navigate(TextBox1.Text)
End If
Napster1488 wrote:If you are Using a WebBrowser then on DocumentCompleted Event Add CodeThat worked great, i just had it in the wrong place i guess? Thanks +Rep
TextBox1.Text=WebBrowser1.Document.Url.ToString

Napster1488 wrote:And to Check if its Valid URL use thisYeah, I have added something like that exept it looks for the /user/ or /watch
If TextBox1.Text.StartsWith("http://www.youtube.com/") then
WebBrowser1.Navigate(TextBox1.Text)
End If
Hope it Helps ;)

If i Help you +Rep cooll;
Im new to visual basic so I probly wont :P
Im new to visual basic so I probly wont :P
~~~~~~~~~~~~~~~~~~~~ LOCKED ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have found the info I need, thanks guys
feel free to go to : viewtopic.php?f=70&t=5617 and check out what I have made 
I have found the info I need, thanks guys


If i Help you +Rep cooll;
Im new to visual basic so I probly wont :P
Im new to visual basic so I probly wont :P
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023