-
Mar 1st, 2015, 05:22 PM
#1
Thread Starter
Member
[RESOLVED] How do you use VB.Net to get HTML Label Innerhtml
So i have HTML agility pack.
I am attempting to read a webpage html. I need the contents of a label but am unsure of how to obtain it.
I know what the for attribute is.. but i don't know how to use it to get the innerhtml of the label.
Can anyone help please
Code:
Private Sub SetTextboxText(ByVal Text As String)
DirectCast(GetCurrentWebForm.item("frmLogin:strCustomerLogin_userID"), mshtml.HTMLInputElement).value = ""
DirectCast(GetCurrentWebForm.item("frmLogin:strCustomerLogin_pwd"), mshtml.HTMLInputElement).value = ""
ClickNormalButton()
Memorable_Reader()
End Sub
'Gets and Sets Memorable Information
Private Sub Memorable_Reader()
'Read Label 'For' Attribute
'Display Innerhtml Text in msgbox
End Sub
'CLICKS THE SUBMIT BUTTON
Private Sub ClickNormalButton()
GetCurrentWebForm.submit()
End Sub
Last edited by DJ_Warp; Mar 1st, 2015 at 05:26 PM.
-
Mar 1st, 2015, 05:47 PM
#2
Re: How do you use VB.Net to get HTML Label Innerhtml
Use .GetElementByID("elementId").InnerHtml for the item required.
- If my post helped you, please Rate it
- If your problem is solved please also mark the thread resolved
I use VS2015 (unless otherwise stated).
_________________________________________________________________________________
B.Sc(Hons), AUS.P, C.Eng, MIET, MIEEE, MBCS / MCSE+Sec, MCSA+Sec, MCP, A+, Net+, Sec+, MCIWD, CIWP, CIWA
I wrote my very first program in 1979, using machine code on a mechanical Olivetti teletype connected to an 8-bit, 78 instruction, 1MHz, Motorola 6800 multi-user system with 2k of memory. Using Windows, I dont think my situation has improved.
-
Mar 1st, 2015, 05:52 PM
#3
Thread Starter
Member
Re: How do you use VB.Net to get HTML Label Innerhtml
The labels have no ID... only the 'for' attribute
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
|