-
April 2nd, 2012, 10:58 AM
#1
how to check for each array in listview?
Hi guys,
I need your help, I'm working on my listview to extract the strings from my php source. I want to check for each array in my listview when i finds the matches of html tags "<span id=""mystrings2"">Enabled", then tick for each checkbox in the listview when the matches are found.
Code:
Private timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
timer1.Enabled = False
timer1.Stop()
Try
Dim URL1 As String = "http://www.mysite.com/myscript.php?user=test&pass=test"
Dim request1 As HttpWebRequest = CType(WebRequest.Create(URL1), HttpWebRequest)
Dim response1 As HttpWebResponse = CType(request1.GetResponse(), HttpWebResponse)
Dim reader1 As New StreamReader(response1.GetResponseStream())
Dim str1 As String = reader1.ReadToEnd()
Dim pattern1 As String = "(<p id='mystrings1'>(.*?)</p>(.*?)<span id=""mystrings2"">Enabled</td>)"
Dim matches1 As MatchCollection = Regex.Matches(str1, pattern1)
For Each x1 As Match In matches1
Dim StrArr1() As String = x1.Value.ToString().Split()
MessageBox.Show(x1.ToString())
Next x1
Catch ex As Exception
End Try
End Sub
Do any of you know how to do this?
Any advice would be much appriecated.
Thanks in advance
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
|