开发者

Web Scraping - Programatically submit and extract values of a form

开发者 https://www.devze.com 2023-03-27 01:32 出处:网络
I have very simple web form containing txtFirstName and txtLastName in aspx page. What I 开发者_JAVA百科want to achieve programatically submit the form and to extract the values being sent in the form

I have very simple web form containing txtFirstName and txtLastName in aspx page. What I 开发者_JAVA百科want to achieve programatically submit the form and to extract the values being sent in the form. Through this extracted data, I want to do the web scraping (harvesting) and need to show in another page.


You can programatically submit the form through javascript.

document.getElementById("form-id").submit();

In server-side retrieve the values from the Form collection in Request object,

string first = Request.Form["txtFirstName"]
0

精彩评论

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