"RAB" <ra*********@yahoo.com> wrote in
news:11**********************@z14g2000cwz.googlegr oups.com:
I created an arraylist. Some items need to be indented.
...
MyList.Add("Text")
MyList.Add(" Text2")
MyList.Add(" Next text")
....
I then databind the arraylist with a datalist control. However,
the datalist control does not recognize my spaces and places all
text left-justified. Is there anything I can do to preserve my
spaces? The indentation follow no pattern and are used to
create an outline format.
Thanks,
RABMissouri
RAB,
When multiple spaces appear in HTML text, the browser will only
display one space. To display multiple spaces, use the
construct (it stands for "Non Breaking SPace").
So your code could be modified like this:
MyList.Add("Text")
MyList.Add(" Text2")
MyList.Add(" Ne xt text")
Run this HTML page to see the difference:
<HTML>
<HEAD>
</HEAD>
<BODY>
Line 1
<BR/>
Line 2
<BR/>
Line &nbs p; 3
</BODY>
</HTML>
--
Hope this helps.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/