Spaces in a drop down list

  • Thread starter Thread starter Eric Sabine
  • Start date Start date
E

Eric Sabine

I am filling a drop down list from a dataset. The resultset contains data
like this
Joe Smith Accounting
Mike Collins Engineering
Joe Walter Engineering
etc.

The text contains purposely inserted spaces, but when it renders in html,
the spaces are removed. They changed the spaces in the dataset on the SQL
side to   but in html, the ampersand was converted to the encoded
ampersand. I even tried wrapping then <asp:dropdownlist> tags within the
<PRE></PRE> tag but that didn't work. Any suggestions on how to get my
dataset provided spaces to translate?

thanks
Eric
 
Thanks Mike. That is exactly what someone showed me today as a suggestion
(Server.HtmlDecode). It would work perfectly however I'm using a dataset
and binding the drop down to the dataset. If I were to iterate throught the
rows of the datatable, then I could certainly use server.htmldecode on each
add method which does exactly what I posted about. I decided to alter the
requirements thought and go without the forced spaces. I appreciate your
help though.

Eric
 
Back
Top