468,145 Members | 1,386 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,145 developers. It's quick & easy.

Pass data from HTML file to Visual Basic .exe From - Auto fill data from web file to

Hi I want to pass html form values (eg Name = Ram) to Visual Basic Form as Auto load same data from Web to Vb.Net exe From.
Sep 6 '19 #1
1 2026
SioSio
238 128KB
Ex.Find name="ie" from html of google site, extract the character string from there to ">" and store it in tg.

Expand|Select|Wrap|Line Numbers
  1. Dim client As WebClient = New WebClient()
  2. Dim Str As string = client.DownloadString ("https://www.google.com/")
  3. Dim SearchStr As String = "name=""ie"""
  4. Dim p1 As Integer = 0
  5. Dim p2 As Integer = 0
  6. Dim ps As Integer = 0
  7. Dim tg As String
  8. p1 = Str.IndexOf(SearchStr, ps)
  9. If p1 >= 0 Then
  10.     p2 = Str.IndexOf(">", p1)
  11.     tg = Str.Substring(p1+SearchStr.Length, p2 - (p1+SearchStr.Length))
  12. End If
Dec 18 '19 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by A-PK | last post: by
6 posts views Thread by harish | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.