469,898 Members | 2,305 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Listbox padding ---adding spaces

Hi there

I currently have a listbox that displays provinces,regions and suburbs.I want to pad the items logically with spaces,but the spaces are being igonred...
eg

Province1
Regions1
region2
Province2
Region3
Suburb1
Suburb2



my code is as follows--I tried to do the following that was suggested somewhere...but still it ignores the spaces....
System.IO.StringWriter writer= new System.IO.StringWriter();
ListItem li2 = new ListItem();
li2.Value = "1,"+regionArray[p, 2];
Server.HtmlDecode(" ", writer);
String DecodedString = writer.ToString();

practiceAreas.Items.Add(DecodedString);---practiceareas is my listbox

Does anybody have any ideas?

Thanks
Nov 9 '06 #1
1 1905
EDIT--I had to put the ----- in this post to illustrate---it was ignored here to!

Hi there

I currently have a listbox that displays provinces,regions and suburbs.I want to pad the items logically with spaces,but the spaces are being igonred...
eg

Province1
-----------Regions1
-----------region2
Province2
-----------Region3
------------------------Suburb1
------------------------Suburb2



my code is as follows--I tried to do the following that was suggested somewhere...but still it ignores the spaces....
System.IO.StringWriter writer= new System.IO.StringWriter();
ListItem li2 = new ListItem();
li2.Value = "1,"+regionArray[p, 2];
Server.HtmlDecode(" ", writer);
String DecodedString = writer.ToString();

practiceAreas.Items.Add(DecodedString);---practiceareas is my listbox

Does anybody have any ideas?

Thanks
Nov 9 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Rowland | last post: by
2 posts views Thread by Papajo | last post: by
8 posts views Thread by VM | last post: by
6 posts views Thread by Manan | last post: by
13 posts views Thread by lossed | last post: by
3 posts views Thread by IchBin | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.