This is my code:

With ad.Tables(2)
    For i As Integer = 0 To .Rows.Count - 1
        If .Rows(i)("name") & "" <> "" Then
            temp &= .Rows(i)("name") & ", "
        End If
    Next
End With
temp = temp.Trim(",")
testing &= "&Name=" & temp & vbCrLf

With this is get a comma in the end of the string. But if I do

temp = temp.Trim.Trim(",")

all commas are deleted.

How do I keep all commas and only delete the last one?

Edit
Report