Hack Forums
[.NET] Submit data & Grab an element by ID using httpwebrequest? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Submit data & Grab an element by ID using httpwebrequest? (/showthread.php?tid=5179713)



Submit data & Grab an element by ID using httpwebrequest? - ipman_98 - Feb 21, 2016

hello everyone! I need help with vb programming.

What I want to do is enter data to a text area in a webpage & grab it's output from another text area using IDs. I know how to do this with WebBrowser Control in VB, but I really want to try this with httpwebrequest. Please help me.




* - tweety - Feb 22, 2016

https://msdn.microsoft.com/en-us/library/debx8sh9(v=vs.110).aspx


* - Ninja - Feb 22, 2016

With webrequests you just get the page source. Find out what requests are sent, using Fiddler or Charles, and mimic them in VB.net and then read the response and parse the information you want (Html parsing, string splitting, regex, json deserializing, whatever).


* - Nikola Тesla - Feb 22, 2016

Use webrequest to get Post data and Regex for grabbing the ID


* - Ninja - Feb 22, 2016

(Feb 22, 2016 11:28 AM)Arnold Schwarzenegger Wrote:  Use webrequest to get Post data and Regex for grabbing the ID

Use webrequest to get post data...? What?
And regex is probably the worst for grabbing the ID.


* - Nikola Тesla - Feb 22, 2016

(Feb 22, 2016 11:45 AM)Tyranitar Wrote:  Use webrequest to get post data...? What?
And regex is probably the worst for grabbing the ID.

Sorry thought he wants to send post to server , but why is regex worst for grabbing ID? what you suggest?


* - Ninja - Feb 22, 2016

(Feb 22, 2016 11:52 AM)Arnold Schwarzenegger Wrote:  Sorry thought he wants to send post to server , but why is regex worst for grabbing ID? what you suggest?

Depends on the response, but string splitting would be fine.
Also, you dont get post data. You post post data.


* - +Haze - Feb 22, 2016

string splitting sucks ass for parsing data from a html document


* - Ninja - Feb 24, 2016

(Feb 22, 2016 01:10 PM)+Haze Wrote:  string splitting sucks ass for parsing data from a html document

If it is one value you need then its perfectly fine.