This is more clear, thank you. This is what I try to say in a message (like 3 messages down) that I need to find a way to replace spaces with the nbsp entity. And I need to translate your code to C#.
>also I notice since I did nbsp; code it put the space, so add the # before
>
>For Each row in dsData.tables(0).Rows
> dropdownlist.items.Add(New ListItem(cstr(row("id")).Trim().PadRight(10,cchar(" ")).Replace(" ", "nbsp;") & cstr(row("description")), cstr(row("id"))))
>Next row
>
>
>>I did find the description of these functions in .net help.
>>I will have to read your code a few times to understand it, I am still learning.
>>Thank you very much.
>>
>>>this is vb.net code you can always look in the help file for .net
>>>
>>>>I would prefer to do it in my SQL select. But I am not familiar with the functions cstr() and cchar(). Where do I learn about them?
>>>>
>>>>Thank you.
>>>>
>>>>>Ok I bet is a HTML prb so what will need to do on that case is convert the scaces to
>>>>>You can do it on your select or you can do it in code I would say in code.
>>>>>so in your code you will have something like this
>>>>>
>>>>>For Each row in dsData.tables(0).Rows
>>>>> dropdownlist.items.Add(New ListItem(cstr(cstr(row("id")).Trim().PadRight(10,cchar(" ")).Replace(" ", " ") & row("description")), cstr(row("id"))))
>>>>>Next row
>>>>>
>>>>>
>>>>>something along this lines.
>>>>>
>>>>>
>>>>>>>Dimitry did you saw the hml that got generated to see if the spaces appears in the html?
>>>>>>>
>>>>>>
>>>>>>Alexandre,
>>>>>>
>>>>>>Yes, the HTML source does show the spaces. I wish there was a way to replace the spaces with NBSP. So, why do you think DDL ignores my spaces?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham