Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //How to set HTML Dropdown value in C# Combobox...
- //Found by: BaSs_HaXoR
- //HTML Tag of site will = "monthDropDown" > http://prntscr.com/46z8tu
- //And the value for: 0-12, for the months.
- //FIRST! Make sure you put this in your combobox: http://prntscr.com/46z97q
- //#2) Paste this somewhere in your project:
- this.webBrowser1.Url = new System.Uri("http://www.yourwebsitehere.com", System.UriKind.Absolute);
- //#3) Then paste this inside your combobox:
- if (monthbox.SelectedIndex == 0)
- {
- webBrowser1.Document.GetElementById("monthDropDown").SetAttribute("value", "0");
- }
- //#) So it will look something like this:
- this.webBrowser1.Url = new System.Uri("https://account.sonyentertainmentnetwork.com/liquid/reg/account/create-account!input.action", System.UriKind.Absolute);
- private void monthbox_SelectedIndexChanged(object sender, EventArgs e)
- {
- if (monthbox.SelectedIndex == 0)
- {
- webBrowser1.Document.GetElementById("monthDropDown").SetAttribute("value", "0");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement