Connect with Expertise | Find Experts, Get Answers, Share Insights

Web Browser Control

 
Join Date: Feb 2010
Posts: 2
#1: Feb 10 '10
Hi

I am using the following code to programmatically fill my form

webbrowser.document.getelementbyid("txtbox").setat tribute("value", "hi")

I am stuck at a point where i need to set the values for select box, check box and radio buttons.

Any help is appreciated.

thanks in advance.

tlhintoq's Avatar
E
C
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 3,476
#2: Feb 10 '10

re: Web Browser Control


have ya tried the ".checked" property? That's what I would use on a windows form

Expand|Select|Wrap|Line Numbers
  1. myCheckbox.Checked = true;
I've never done it for a webform but I would guess something that looks like

Expand|Select|Wrap|Line Numbers
  1. webbrowser.document.getelementbyid("mycheckbox").setattribute("checked", true)
  2. // or
  3. webbrowser.document.getelementbyid("mycheckbox").setattribute("checked", "true")
  4.  
 
Join Date: Feb 2010
Posts: 2
#3: Feb 10 '10

re: Web Browser Control


The SetAttribute accepts two parameters and both should be string. The above code doesnt works.

Thanks for you help. I am still looking for a solution.
Reply

Tags
c sharp, check box, radio button., select box, web browser control