Can you parse in asp.net?

binici

Active member
Joined
Sep 11, 2006
Messages
26
Programming Experience
Beginner
Hello:

I'm not sure where to start, but I have this problem I ran into:

I have a CheckBoxList, which I loop through each item in the list and then send the string value to a table.

For Each li In view_description.Items
If li.Selected = True Then
ListBoxItems = ListBoxItems & li.Value & ","
End If
Next

Inserting to the database is fine, now my question is, when I read from the table how will I be able to parse each string, which are seperated by commas and set them to each CheckBoxList?

example of the CheckBoxList:

<asp:CheckBoxList ID="parking_type" runat="server" RepeatColumns="3" RepeatDirection="Vertical" RepeatLayout="Table" BorderWidth="1">
<asp:ListItem Value="Carport" Text="Carport"></asp:ListItem>
<asp:ListItem Value="Direct Garage Access" Text="Direct Garage Access"></asp:ListItem>
<asp:ListItem Value="Driveway" Text="Driveway"></asp:ListItem>
<asp:ListItem Value="Garage Attached" Text="Garage Attached"></asp:ListItem>
<asp:ListItem Value="Garage Detached" Text="Garage Detached"></asp:ListItem>
<asp:ListItem Value="Garage Door Opener" Text="Garage Door Opener"></asp:ListItem>
<asp:ListItem Value="Gated Parking" Text="Gated Parking"></asp:ListItem>
<asp:ListItem Value="Golf Cart Garage" Text="Golf Cart Garage"></asp:ListItem>
<asp:ListItem Value="RV Access/Parking" Text="RV Access/Parking"></asp:ListItem>
<asp:ListItem Value="RV Garage" Text="RV Garage"></asp:ListItem>
<asp:ListItem Value="Subterranean Parking" Text="Subterranean Parking"></asp:ListItem>
</asp:CheckBoxList>

results in table:
Back Bay View, Pier, Pool, Back Bay View,Pier,Pool,

Is it possible? [?]

Thanks!
 
Top Bottom