Help with listboxes

  • Thread starter Thread starter fatima.issawi
  • Start date Start date
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
 
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.
 
Back
Top