C# 单击按钮下载FileAsync

C# 单击按钮下载FileAsync,c#,webclient-download,C#,Webclient Download,我有一个网页,其中包含两个字段,如下所示 <input type="text" value="1-1-2020" name="startDate" /> <input type="text" value="1-31-2020" name="endDate" /> <button type="submit" name="sbmtButton"></button> 我想知道是否可以导航到该页面,然后触发submit按钮并使用WebClient下载

我有一个网页,其中包含两个字段,如下所示

<input type="text" value="1-1-2020" name="startDate" />
<input type="text" value="1-31-2020" name="endDate" />
<button type="submit" name="sbmtButton"></button>

我想知道是否可以导航到该页面,然后触发submit按钮并使用
WebClient
下载.xls文件


提前感谢。

假设您提供的HTML位于。。。。您应该能够使用WebClient向表单的action属性中配置的端点发送帖子。好的,那么我该如何发送表单的数据呢?Google博士是您的朋友C#网络客户端发布示例”。