String.Join(",",YourArray)
另外,如果要从复选列表(或radiobuttonlist)中获取所有选定的项目,您可以使用扩展方法(如下所示的复选框):
调用语法:Dim sResults As String = MyCheckBoxList.ToStringList()
<Extension()> _ Public Function ToStringList(ByVal cbl As System.Web.UI.WebControls.CheckBoxList) As String Dim separator As String = "," Dim values As New ArrayList For Each objItem As UI.WebControls.ListItem In cbl.Items If objItem.Selected Then values.Add(objItem.Value.ToString) End If Next Return String.Join(separator,values.ToArray(GetType(String))) End Function