473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Spaces in a drop down list

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
Nov 18 '05 #1
2 2374
This should help you. Go to the end of the thread.

http://groups.google.com/groups?hl=e...%3D20%26sa%3DN
"Eric Sabine" <mo*****@hyottmail.com> wrote in message
news:3f***********************@news.twtelecom.net. ..
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 &nbsp; 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

Nov 18 '05 #2
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

"vMike" <Mi************@nospam.gewarren.com.delete> wrote in message
news:bp**********@ngspool-d02.news.aol.com...
This should help you. Go to the end of the thread.

http://groups.google.com/groups?hl=e...%3D20%26sa%3DN

"Eric Sabine" <mo*****@hyottmail.com> wrote in message
news:3f***********************@news.twtelecom.net. ..
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 &nbsp; 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


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Manan | last post by:
hello All, I have a simple question..I'm creating a tempString that contains my values then i'm adding to a ListItemCollection (). In my tempString i'm adding a spaces between each values it...
3
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
1
by: pmelanso | last post by:
Hello, I have a drop down list which is dynatically loaded from a database and I have a second drop down list that is also dynatically loaded depending on what is selected in the first drop down...
4
by: Ryan | last post by:
I am databinding the dropdown list of a textbox in ASP.net. I am trying to get three columns to display to the user. Since I can't do that normally, I made my query display the three columns like...
8
by: Ed Dror | last post by:
Hi there ASP.NET 2.0 VB & SQL Express Lest take Northwind Categories Products as example I create a table that hold these two together and I create a stored procedure like select ProductID,...
5
by: ashok893 | last post by:
I'm using two drop down list ina form. I have generated the first drop down list from MySQL database. When i select an option from first drop down list, i have to generate second drop down list...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
3
by: penny111 | last post by:
Hi there, For my application, i need to have 3 drop down lists 1. drop down list of folder names 2. drop down list of documents in the folder selected 3. drop down list of instances of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.