By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,721 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,721 IT Pros & Developers. It's quick & easy.

  in a ListItem doesn't seem to work

P: n/a
I am trying to add an indent to a Dropdown control. I prefix the text for
the ListItem with a couple   but it doesn't render the tags to spaces ,
instead the dropdown list shows:

MainItem
  SubItem
  SubItem

Thanks,
--
Bill Green
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
the list item's text property does not support html, only text

-- bruce (sqlwok.com)
"Bill Green" <gr********@hotmail.com> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
I am trying to add an indent to a Dropdown control. I prefix the text for
the ListItem with a couple &nbsp; but it doesn't render the tags to spaces , instead the dropdown list shows:

MainItem
&nbsp;&nbsp;SubItem
&nbsp;&nbsp;SubItem

Thanks,
--
Bill Green

Nov 18 '05 #2

P: n/a
Here is a solution to that problem that was posted some time ago by someone
else.

Dim Padding As String
Dim writer As New System.IO.StringWriter()
Dim DecodedString As String

Padding = "&nbsp;&nbsp;"
Server.HtmlDecode(Padding, writer)
Padding = writer.ToString()

myDropDownList2.Items.Add(Padding & " MVP's")

Padding = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;"
Server.HtmlDecode(Padding, writer)
Padding = writer.ToString()

myDropDownList2.Items.Add(Padding & " MVP's")

myDropDownList2.Items.Add("MVP's" & Padding & "Do Their best")

"Bill Green" <gr********@hotmail.com> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
I am trying to add an indent to a Dropdown control. I prefix the text for
the ListItem with a couple &nbsp; but it doesn't render the tags to spaces , instead the dropdown list shows:

MainItem
&nbsp;&nbsp;SubItem
&nbsp;&nbsp;SubItem

Thanks,
--
Bill Green

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.