jwhiteman1967
asked on
How do I find the password in an <input> tag?
In need to be able to tell which <input> tags have the 'password' type.
ex:
<input type="password" name="password" size="12">
Here is what I have, but I have something wrong...
Dim htmlCollection As HtmlElementCollection = WebBrowser.Document.GetEle mentsByTag Name("INPU T")
For Each elem As HtmlElement In htmlCollection
Dim ElemName As String
ElemName = elem.GetAttribute("passwor d")
'elem.SetAttribute("passwo rd", Trim(strPassword))
'MessageBox.Show(elem.TagN ame, elem.)
If elem.GetAttribute("passwor d") = "" Then
WebBrowser.Document.All(el em.Name).I nnerText = Trim(strPassword)
bPassword = True
Exit For
End If
Next
Thanks!
ex:
<input type="password" name="password" size="12">
Here is what I have, but I have something wrong...
Dim htmlCollection As HtmlElementCollection = WebBrowser.Document.GetEle
For Each elem As HtmlElement In htmlCollection
Dim ElemName As String
ElemName = elem.GetAttribute("passwor
'elem.SetAttribute("passwo
'MessageBox.Show(elem.TagN
If elem.GetAttribute("passwor
WebBrowser.Document.All(el
bPassword = True
Exit For
End If
Next
Thanks!
try
m.GetAttribute("Type")
m.GetAttribute("Type")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why can't you just make that password input, runat="server"?
ex:
'aspx
<input type="password" id="password" size="12" runat="server">
'aspx.vb
password.value = Trim(strPassword)