Question Webbrowser get and navigate to a var

loopax

New member
Joined
Feb 26, 2018
Messages
2
Programming Experience
Beginner
I have an iframe with a div called "iframeContent" which loads its content based on the "src" value, ex:
HTML:
<iframe id="iframeContent" src="http://example.com/client/?time=19422sign=bb978c2&language=en"></iframe>


When I click the button (supposing the document is loaded), I want to read that "src" value (the link) and navigate to it, I am not sure why but it navigates to "http://src" instead, which I think it means src is not an url at that point, what I am doing wrong?

I've been trying something like this

VB.NET:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

     WebBrowser1.Document.GetElementById("iframeContent").GetAttribute("src")
     WebBrowser1.Navigate("src")

End Sub
 
You're missing a variable to hold a value and use later, pseudo:
VB.NET:
dim var = ...GetAttribute
....Navigate(var)
 
Back
Top