CHPP Development/VB.NET/: Difference between revisions
From Hattrick
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
<u><b>Code #1</b>: Getting the recommended server</u> | <u><b>Code #1</b>: Getting the recommended [[server]]</u> | ||
| Line 9: | Line 9: | ||
xmlTable = xmlds.Tables("HattrickData") | xmlTable = xmlds.Tables("HattrickData") | ||
xmldr = xmlTable.Select(Nothing, Nothing, Data.DataViewRowState.CurrentRows) | xmldr = xmlTable.Select(Nothing, Nothing, Data.DataViewRowState.CurrentRows) | ||
Return (xmldr(0)( | Return (xmldr(0)("RecommendedURL").ToString) | ||
End Function | End Function | ||
[[Category:Programming Languages|VB.NET]] | |||
Latest revision as of 21:34, 21 May 2007
Code #1: Getting the recommended server
Protected Function Get_Recommended_Server()
Dim xmlds As New System.Data.DataSet
Dim xmlTable As New System.Data.DataTable
Dim xmldr As System.Data.DataRow()
xmlds.ReadXml("http://www.hattrick.org/common/menu.asp?outputType=XML")
xmlTable = xmlds.Tables("HattrickData")
xmldr = xmlTable.Select(Nothing, Nothing, Data.DataViewRowState.CurrentRows)
Return (xmldr(0)("RecommendedURL").ToString)
End Function