Help with listboxes

F

fatima.issawi

Hello,

I am creating a web page using c# and asp.net. I am trying to populate
a list box by reading text from a file.


The text in the file has leading spaces in order to show a hierarchy of

the items. I would like this formatting to show up in the listbox, but
it seems that strings are trimmed before adding them to the listbox.


Is there any way for the spaces in the strings I am adding to a list
box be kept? Is there another way of doing this or another control I
can use? Any help is appreciated.


If you need more clarification, please let me know.


Thanks,
Fatima
 
T

tsaunders

Hello,

I am creating a web page using c# and asp.net. I am trying to populate
a list box by reading text from a file.


The text in the file has leading spaces in order to show a hierarchy of

the items. I would like this formatting to show up in the listbox, but
it seems that strings are trimmed before adding them to the listbox.


Is there any way for the spaces in the strings I am adding to a list
box be kept? Is there another way of doing this or another control I
can use? Any help is appreciated.


If you need more clarification, please let me know.


Thanks,
Fatima

If your using .NET 2.0 you could use the treeview to show this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top