我需要将动态网页来源的innertext显示到datagridview中的表格中。 我只能使用以下代码在列中显示所有这些,但不能显示行:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim div As HtmlElement = WebBrowser1.Document.GetElementById("today")
Dim spans As HtmlElementCollection = div.GetElementsByTagName("SPAN")
For j As Integer = 0 To spans.Count - 1
If spans(j).InnerText <> "" Then
MessageBox.Show(spans(j).InnerText.ToString)
End If
Next
End Sub
我该如何逐行显示它们?