tags:

views:

100

answers:

1

hi

i have any website that has 4 textboxs

i need to insert the word "YES" to textbox number 2

how i can do it using C# winform code ?

thank's in advance

+1  A: 

chek out my login code:

HtmlElementCollection trytologin = ((WebBrowser)sender).Document.GetElementsByTagName("input");

    var usernameInput = (from HtmlElement input in trytologin where input.Name == "username" select input).Single();
    var passwordInput = (from HtmlElement input in trytologin where input.Name == "password" select input).Single();
    usernameInput.SetAttribute("value", "myusrname");
    passwordInput.SetAttribute("value", "mypassword");
Luiscencio
thank's for he help, but how to use it ?it dosent work
Gold
did you tried something??? can you post some code??
Luiscencio
i try this code, and nothing.....
Gold
of course this is just an example, you must replace the input's names with the ones on your textboxes
Luiscencio
but i dont know the textbox name, i need to insert my text on any textbox of any websit that has 4 textboxs
Gold
you need to know the names of the textboxes... how do you spect the progrma to know who is textbox # 2????
Luiscencio