The code below has worked for me in the past
--
Regards
John Timney
Microsoft Regional Director
Microsoft MVP
----------------------------------------------------------------------------
------------------------------------
<blatant plug>
Professional .NET for Java Developers with C#- ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547
Professional JSP 2nd Edition - ISBN: 1861004958
Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>
----------------------------------------------------------------------------
------------------------------------
<%@ Page Language="VB" Debug="true" %>
<script language=VB runat=server>
Sub Page_Load(Sender As Object, E As EventArgs)
Dim Padding As String
Dim writer As New System.IO.StringWriter()
Dim DecodedString As String
Padding = " "
Server.HtmlDecode(Padding, writer)
Padding = writer.ToString()
myDropDownList2.Items.Add(Padding & " MVP's")
Padding = " &nb sp;"
Server.HtmlDecode(Padding, writer)
Padding = writer.ToString()
myDropDownList2.Items.Add(Padding & " MVP's")
myDropDownList2.Items.Add("MVP's" & Padding & "Do Their best")
End Sub
</script>
<html>
<head><title>Padding DropListBox</title></head>
<body>
<form fred runat="server">
<asp:dropdownlist
id="MyDropDownList2"
runat="server"
/>
</form>
</body>
</html>
"TJS" <no****@here.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
I am populating a droplist control from a query.
each line of content in the dropdownlist gets "trimmed" automatically .
how can I force a leading space to a line in a dropdown list ??