Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想自动填写网页,然后用 C# 提交数据。
我怎样才能做到这一点?
您需要向网络服务器伪造一个 POST HTTP 请求。您将需要以下类: HttpWebRequest和HttpWebResponse。POST 数据将是表单字段的值,要找出浏览器发出的 POST 请求,请查看Wireshark。
另一种方式可能是WebClient。
您是指以编程方式还是在实际浏览器窗口内部?如果是后者,请尝试WatiN。