TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
arshad magdum
NA
15
5.5k
webbrowser control login problem
Aug 23 2011 2:33 AM
hi,
i am developing one application in this i need to automatically login in website but this website has connection encrypted:High grade Encryption(AES-128,128bit keys) and login window have three fields username inputbox type="text" password inputbox type="password" and third terminal dropdownlist box which has two values. i am using webbrowser control for this i have written code for this also but when i run my programme only username and terminal (dropdownlist) shows the value password input box doesn't shows the value so what's the problem so please help me its urgent. my code as below
If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
Dim frmform As HtmlElement = WebBrowser1.Document.Forms("aspnetForm")
frmform.All("ctl00_lnkLogin").InvokeMember("Click")
frmform.All("ctl00_txtUserName").SetAttribute("value", sUserID)
Dim oPassword As HtmlElement
oPassword = WebBrowser1.Document.All.Item("ctl00$txtPassword")
oPassword.InnerText = sPWD
'frmform.All("ctl00_txtPassword").SetAttribute("value", sPWD)
Dim He As HtmlElement = WebBrowser1.Document.GetElementById("ctl00_cboTerminal")
He.SetAttribute("SelectedIndex", "1")
'frmform.GetElementsByTagName("select")(0).Document.GetElementsByTagName("option")(1).SetAttribute("selected", "true")
''frmform.All("ctl00$cboTerminal").InvokeMember("SelectedIndexChanged")
''frmform.GetElementsByTagName("select")(0).Document.GetElementsByTagName("option")(1).SetAttribute("selected", "true")
frmform.All("ctl00_btnLogin").Enabled = True
frmform.All("ctl00_btnLogin").InvokeMember("Submit")
End If
Thanks and Regards
Arshad
Reply
Answers (
1
)
ASP.NET
How to select multiple/all items in listbox