473,395 Members | 1,624 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Help with listboxes

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

Nov 30 '06 #1
3 1076

fa***********@gmail.com wrote:
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.

Nov 30 '06 #2
I need multiple selection. I don't think that is available in the
treeview.
ts*******@dynology.com wrote:
fa***********@gmail.com wrote:
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.
Nov 30 '06 #3
I need multiple selection. I don't think that is available in the
treeview.
ts*******@dynology.com wrote:
fa***********@gmail.com wrote:
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.
Nov 30 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: softengine | last post by:
Can and how do you alter a data view to include a look up field from another data table? The data table of the dataview only has the key, the value I need is in another data table. Can and how...
9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
4
by: bill yeager | last post by:
I have several template columns inside of a datagrid. Inside of these template columns are databound listboxes: <asp:TemplateColumn HeaderText="Crew Chiefs"> <ItemTemplate> <asp:listbox...
0
by: Terry D | last post by:
I'm having an issue with an ASP.NET page (VS.NET 2003, VB.NET, Oracle back end). The page uses the standard VS.NET grid to display the records from a particular table. The user can edit certain...
1
by: Ryan Ternier | last post by:
I have two listboxes, and allow users to move items between them via the following function: function SwitchList(fbox, tbox){ var arrFbox = new Array(); var arrTbox = new Array(); var...
0
by: Luis Esteban Valencia | last post by:
have a problem and I'm not sure how to handle/fix it. I have three listboxes on my page. The first listbox has a list of software products. When you select an item in the Products listbox, then...
8
by: Art DeBuigny | last post by:
Hi all I have tried several methods to do as follows I have a form with two listboxes and a few buttons. The listbox on the left is databound to a table, the other is loaded based on what...
0
by: Alex | last post by:
Subject: Help with DoDragDrop event? From: Alex <me112006@test.com> Newsgroups: microsoft.public.dotnet.languages.csharp Hi all, I'm having a problem with drag/drop on listboxes... ...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
3
JodiPhillips
by: JodiPhillips | last post by:
Hello everyone, there are many questions and answers relating to moving items between two listboxes here and on the net in general, however, none answer my specific problem. I have two listboxes...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.