Post Reply 
Social Buttons
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB.Net WebBrowser > GetElementByID
Author Message
Ironside Offline
Site Owner
**********

Trade Count: (0)
Posts: 170
Joined: Nov 2010
Reputation: 7
Post: #1
VB.Net WebBrowser > GetElementByID
I am using http://m3d0t.tk/

Right Click>View Source> then you move down to this:
Code:
<div id="content">  
<div id="startform">  
<font color="#379BFF">•</font> Enter the URL(s) below (each URL on it's line, with http://[...]):
  
<font color="#379BFF">•</font> Maximum 5 files per day!
  
<form id="urlform" method="POST" onSubmit="download(); return false;">  
<textarea id="urls" cols="69" rows="10" maxlength="10000"></textarea>

  
<center><input type="submit" value="Download them!" id="submitb" /></center>  
</form>  
</div>
What you want to do is take this line of code:
Code:
WebBrowser1.Document.GetElementById("blah").InvokeMember("Click")
And change the "blah" to "submitb" < that makes it so if you click the button it will click the Submit button on the page

Now textboxes like this:
Code:
WebBrowser1.Document.GetElementById("urls").SetAttribute("value", TextBox1.Text)
You use the ID urls to show where your program puts the text. Thus your program will enter that text for you Smile on button of coarse hope this helped.
11-12-2010 04:24 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: