Webpage text to textbox. [solved]

Posts 1–15 of 15 · Page 1 of 1
Webpage text to textbox. [solved]

I want to put that text on textbox in vb my Project,is it possible?
anyone help , Please?
I guess using element Id? But i dont know how.
what do you mean exactly?

you mean this text in textbox1?
Quote Originally Posted by Paul View Post
what do you mean exactly?

you mean this text in textbox1?
Noooo I want that text go to my textbox1 on my VB project.
Quote Originally Posted by Exquizyth View Post
Noooo I want that text go to my textbox1 on my VB project.
Sure it's possible, just use HttpWebRequests/Responses to extract the page source, then parse the resulting source til you are left with that value, then set the TextBox's text property to that value. If you don't know how, just PM me a link to the webpage and I'll write it for you.
Quote Originally Posted by Jason View Post


Sure it's possible, just use HttpWebRequests/Responses to extract the page source, then parse the resulting source til you are left with that value, then set the TextBox's text property to that value. If you don't know how, just PM me a link to the webpage and I'll write it for you.
Yeah Thanks i will try it to solve it by myself , if i cant do it i will PM you for help...
edit : I can`t do it LOL..i will pm you ..
textbox1.text = webBrowser1.Document.GetElementByID("TextID/DivID").InnerText;
Or something..
Make a webbrowser , call it webbrowser1 ( it will be called that as default )
Set the url to the webpage

then make a button or timer or w/e which will copy it

, then make

Code:
Textbox1.Text = Webbrowser1.Document.GetElementsByID('Get the id of the text by using inspect element in chrome or opera).Innertext
Also look at this tutorial , it have some webbrowser commands ..

http://www.mpgh.net/forum/33-visual-...generator.html

All credits goes to lolland for the tutorial
Why the fuck would you put in a webbrowser for something as simple as this :/ it's not like he has to click anything so there are no excuses.
Quote Originally Posted by Jason View Post
Why the fuck would you put in a webbrowser for something as simple as this :/ it's not like he has to click anything so there are no excuses.
So...teach us
Quote Originally Posted by Lyoto Machida View Post


So...teach us
Uh, just download my Web Scraping toolkit and it's easy as crap. WebClass.GetPageSource("website here") then use WebClass.GetBetween("thepagesource", "some crap on the left of what youwant", "some crap on the right of what you want").Value to get the value you need.
Quote Originally Posted by Jason View Post
Why the fuck would you put in a webbrowser for something as simple as this :/ it's not like he has to click anything so there are no excuses.
Cause webbrowser is more stable and has common sense ( Not completely stable , only if you launch the code before the page finishes loading can be fixed by adding some codes in Webbrowser#_DocumentCompleted )


Quote Originally Posted by Jason View Post


Uh, just download my Web Scraping toolkit and it's easy as crap. WebClass.GetPageSource("website here") then use WebClass.GetBetween("thepagesource", "some crap on the left of what youwant", "some crap on the right of what you want").Value to get the value you need.
Web browser's code is smaller .
Quote Originally Posted by Shadeyz346 View Post


Cause webbrowser is more stable and has common sense ( Not completely stable , only if you launch the code before the page finishes loading can be fixed by adding some codes in Webbrowser#_DocumentCompleted )




Web browser's code is smaller .
Herp derp, it's less efficient, slow, has crappy click noises, unstable, events are pathetically inaccurate, memory used is not worth the benefit from being lazy.

Less code? I could get the info in 2 lines of code if I used my ToolKit (which is simply a wrapper class so you don't have to do the bulk of the coding) but lines of code should NEVER, EVER stop you picking a superior solution over an inferior one, that's just poor coding habit.
stable? more like waste of memory, time and resources. For some users it might be open to exploits if they are using an outdated version of IE or have not installed updates since the control is just an IE wrapper.
Already Solved Thank you Guyz!
Marked solved then.
Posts 1–15 of 15 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us