Click here to Skip to main content
16,017,376 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I am creating a project, in which I am using mozilla firefox in c#.
I can access everything perfectly, but I can not access dropdownlist in "geckowebbrowser1" control.
I have this below code for textbox.
geckoInputElement obj1 = new gecckoInputElement(geckowebbrowser1.document.getElementByName("input")[0].DomElement);

 obj1.value = " GolMaal"

But I can not access dropdownlist using "geckoSelectElement" Class.

Please help me in that.
Posted
v2

1 solution

Why not use 'getElementByName' ? Or better, 'getElementById' ?
 
Share this answer
 
Comments
Sunny Tiwari 20-Jul-12 5:49am    
i have done this think but it is not successful
Christian Graus 20-Jul-12 17:48pm    
It's possible the control flat out does not work. It's possible you're doing it wrong. 'It is not successful' with no explanation of what goes wrong, or the HTML you're parsing, is not enough info to offer help.
Sunny Tiwari 21-Jul-12 6:33am    
Hello Sir
i am really greatful to you for supporting me Sir I am using mozilla browser in my project it means GeckoFX.
I have successfully put value inside the input element type="text" using beloww syntex:-
geckoInputElement obj1 = new gecckoInputElement(geckowebbrowser1.document.getElementByName("name attribue of element")[0].DomElement);

obj1.value = " GolMaal"
but if i use getelementByID in pleace of getElementByName but it is not successful "getelementByID" does not access to proper element

NOW THE PROBLEM IS
HOW TO PUT VALUE INSIDE DROPDOWNLIST (SELECT ELEMENT)FORM c#
WEB BROWSER IS GECKOWEBBROWSER CONTROL
IF YOU DO SOMETING I WILL BE GREATFUL TO YOU FOREVER

AND I NEED SOKET PROGRAMMING ALSO IN WHICH I WANT TO SEBD A POCKET FROM BROWSER AND RECIEVE PACKET AND SHOW INSIDE BROWSER

PLEASE GUIDE ME

SUNIL TIWARI
Christian Graus 21-Jul-12 6:37am    
Are you giving your controls ids, or just names ? Either way, the same code that finds an input, should find a select.
Sunny Tiwari 21-Jul-12 7:22am    
hello sir
same code does not help me
select element is parent and option is child
i am using geckoselectelement but i do not know proper coding
please help me with example

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900