With this simple vb.net function You are able to extract content from HTML tags, useful and smart
Max 🙂
[sourcecode language=”vb”] Public Function GetTagContent(ByRef html As String, ByVal start_tag As String, ByVal end_tag As String) As StringDim s As String = ""
Dim content() As String = html.Split(start_tag)
If content.Count > 1 Then
Dim parts() As String = content(1).Split(end_tag)
If parts.Count > 1 Then
s = parts(0)
End If
End If
Return s
End Function
[/sourcecode]
Leave a Reply