Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change OPTIONS of SELECT in HTML via Webbrowser control
Message
De
15/11/2004 17:36:52
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Change OPTIONS of SELECT in HTML via Webbrowser control
Divers
Thread ID:
00961556
Message ID:
00961556
Vues:
62
Hi,

I'm using the MS webbrowser control in a C# windows form. I've displayed an HTML page that has a dropdown list using standard HTML tags for Select...and Option.

My problem is now I need to change the options that appear in the list. I've tried to use something along the following:
IHTMLElement dropdown = (IHTMLElement) htmlDocument.all.item("comboselections", null);
dropdown.innerHTML = "<OPTION value=1>Selection 1</OPTION><OPTION value=2>Selection 2</OPTION>;
but all I end up with is an empty, narrow drowdown. "comboselections" is the ID that I assigned to the SELECT input. "htmlDocument" is a reference to the HTML document that I am displaying in the browser.


What am I doing wrong?

TIA.
Répondre
Fil
Voir

Click here to load this message in the networking platform