且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

当网页托管在WebBrowser控件中时,如何单击ASP.NET Web窗体的按钮

更新时间:2023-12-06 12:50:22

由于ASP.NET验证程序的复杂性以某种方式弄乱了正常的form.submit()流,因此必须调用提交按钮的click方法:>

Because of the complication of the ASP.NET validators somehow messing with the normal form.submit() flow the submit button's click method had to be called:

WebBrowser1.Document.getElementById("mybutton").InvokeMember("click");