nomaam Posted May 17, 2005 Posted May 17, 2005 Hello, I am using VB.NET and am working within a Windows Form. Within my form i have a web consol where i navigate to a website that contains a web form. I would like to enter data into the form. Currently i use this method which works well: web1.Document.forms("formname").fieldname.value = "testdata" This works well, but my problem is that i am currently working with a web form that has no name, how would i enter data into a web form with no name? I have tried many variations with no success, such as the following: web1.Document.forms("form").fieldname.value = "testdata" web1.Document.forms("").fieldname.value = "testdata" web1.Document.forms().fieldname.value = "testdata" web1.Document.forms.fieldname.value = "testdata" web1.Document.fieldname.value = "testdata" Could someone suggest a way to enter data into a web form that has no name? Thanks. Quote
PWNettle Posted May 17, 2005 Posted May 17, 2005 Try: web1.Document.getElementById("fieldname").value = "testdata" Paul Quote
nomaam Posted May 17, 2005 Author Posted May 17, 2005 thanks, but i have solved it earlier. web1.Document.forms(0).fieldname.value = "testdata" Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.