开发者

How Design A Software to InputData In WebForm Automatically?

开发者 https://www.devze.com 2022-12-20 06:34 出处:网络
I Want Create A Software to Input Data in WebForms Automatically (like Robot) And Accept Input Data. How I Can Create this Software in C# (Windows Application)?

I Want Create A Software to Input Data in WebForms Automatically (like Robot) And Accept Input Data.

How I Can Create this Software in C# (Windows Application)?

wha开发者_如何学运维t Technologies Must Be Used?

What OpenSource Project Exist for use?

Sample Code And etc...

Please Help Me


I hope you're doing something within the acceptable terms of use with the content you automatically post. Ie. you do not ask how to create yet another spam bot...

To grab the HTTP form you can use WebRequest. This returns the content of the page (including the form) as a response stream. You can then parse the response using HtmlAgility pack, for the forms you are interested. Once you know the forms and fields in the page, you can set values for the fields and post a response, again using a WebRequest but changing the method to POST and encoding the reponse fields as application/x-www-form-urlencoded content, see How to: Send Data Using the WebRequest Class.

This method is using almost the most basic building blocks, going lower level than this would mean using sockets and formating the HTTP request yourself. At this low level you'll have a great deal of freedom and flexibility on how to parse the form and send back the request, at the cost of actually having to understand how WebForms and HTTP work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号