Try
StrWer = File.OpenText(Server.MapPath("MyFiles/") & "tutorial.csv")
Attributes = StrWer.ReadLine
Dim splitAttribute = Split(Attributes, textdelimiter)
NumAttribute = UBound(splitAttribute)
lbltext.Text = "Here is the Data." & "<br>"
While StrWer.Peek <> -1
Dim Dataset = StrWer.ReadLine
NumDataset += 1
Dim splitDataset = Split(Dataset, textdelimiter)
For j = 0 To UBound(splitDataset)
AttTable(NumDataset - 1, j) = splitDataset(j)
Next
End While
StrWer.Close()
AttSelection()
End Sub
Private Sub AttSelection()
Dim AttWork(,) As String
ReDim AttWork(NumDataset, NumAttribute)
For Attno = 0 To NumAttribute - 1
For Num = 0 To NumDataset - 1
If ตัวแปรไม่ซ้ำใน Attwork Then
เพิ่มตัวแปร
นับค่าสะสมผลลัพธ์
Else If ตัวแปรมีอยู่แล้วใน Attwork
If คำตอบเป็น yes
นับค่าสะสมผลลัพธ์ AttWork(
Else