开发者

(VB .Net) Parsing Listbox entries into Textboxes with comma delimiters

Just what the title says. I have a listbox with varied entries, all in one format:

name, email, phone, age

When an entry is selected, and when a certain button is clicked, I require the entry to be removed from the listbox and the four 开发者_Go百科categories from the entry must each go into their assigned textboxes.

Could someone please help me with this?


Use Split. Try something like this, with "value" as the selected listbox text.

Dim parts As String = value.Split (",")
Dim name As String = Trim(parts (0))
Dim email As String = Trim(parts (1))
Dim phone As String = Trim(parts (2))
Dim age As String = Trim(parts (3))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜