How do I change a dropdown box in a webbrowser control?

前端 未结 2 2018
终归单人心
终归单人心 2020-12-18 09:49

So I have a listbox I want to change, that looks like this:

\"enter

How do I c

2条回答
  •  鱼传尺愫
    2020-12-18 10:38

    View the HTML of the website and identify the id and values of the dropdownlist, for example:

    
    

    To pre-select the dropdownlist value in the WebBrowser control use this Winform code:

    webBrowser1.Document.GetElementById("bdayMonthId").SetAttribute("value", "Feb");
    

提交回复
热议问题