|
-
Jan 2nd, 2010, 08:04 PM
#1
Thread Starter
New Member
Help with web forms
Hi So i am trying to make a program that registers and account on a website and i am having a few problems, first ill post my code:
Code:
WebBrowser1.Document.GetElementById("date_month").InnerText = ComboBox1.Text
WebBrowser1.Document.GetElementById("date_day").InnerText = ComboBox2.Text
WebBrowser1.Document.GetElementById("date_year").InnerText = TextBox1.Text
WebBrowser1.Document.GetElementById("login").InnerText = TextBox2.Text
WebBrowser1.Document.GetElementById("character_name").InnerText = TextBox3.Text
WebBrowser1.Document.GetElementById("password").InnerText = TextBox4.Text
WebBrowser1.Document.GetElementById("confirm").InnerText = TextBox5.Text
WebBrowser1.Document.GetElementById("email").InnerText = TextBox6.Text
Here are my problems:
1. When i inpute the month, it doesnt input it, it just makes the combobox on the website smaller for some reason
2. I cant get the email working because you must put your birhtday before it shows where to put your email, obviously fixing the first problem should fix this.
3. There are 2 radiobuttons on the website, for a boy and a girl and I have 2 radiobuttons in my form, however I have exactly no idea how to program it to change.
Your help is greatly appreciated.
-
Jan 5th, 2010, 03:24 PM
#2
Thread Starter
New Member
-
Jan 5th, 2010, 03:32 PM
#3
Re: Help with web forms
this has been asked a number of times....
http://www.vbforums.com/showthread.p...=fill+web+form
searching the forums for "fill web form" turned up a lot of threads. So you don't waste your time, I think the first one that will be of some use is: VS 2010 Web Browser - Auto Fill In started by Noximana
-tg
-
Jan 5th, 2010, 05:12 PM
#4
Thread Starter
New Member
Re: Help with web forms
This still doesnt answer my question about the drop-down menu/combobox.
-
Jan 5th, 2010, 05:36 PM
#5
Re: Help with web forms
you need to be setting the value of the item once you have it... not the innertext.
as in this example:
WebBrowser1.Document.DomDocument.GetElementById("username").Value = TextBox1.Text
and this one:
WebBrowser1.Document.All("vb_login_username").Value = TextBox1.Text
and I appologize... I meant to post the link to the search results page... not to a specific thread.
-tg
-
Jan 5th, 2010, 05:44 PM
#6
Thread Starter
New Member
Re: Help with web forms
Ok edit I got those working, now just the radio buttons
Im using this code:
If RadioButton1.Checked = True Then
DirectCast(GetCurrentWebForm.item("character_gender", 1), mshtml.HTMLOptionButtonElement).checked = True
Else
DirectCast(GetCurrentWebForm.item("character_gender", 0), mshtml.HTMLOptionButtonElement).checked = True
End If
But I get these errors:
GetCurrentWebForm is not declared
Type 'mshtml.HTMLOptionButtonElement' is not defined.
Last edited by TYDIRocks; Jan 5th, 2010 at 05:49 PM.
-
Jan 6th, 2010, 08:11 PM
#7
Thread Starter
New Member
-
Jan 8th, 2010, 05:25 PM
#8
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|