473,672 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:dropdownli st> 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 2385
This should help you. Go to the end of the thread.

http://groups.google.com/groups?hl=e...%3D20%26sa%3DN
"Eric Sabine" <mo*****@hyottm ail.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:dropdownli st> 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.HtmlDec ode). 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.htmldeco de 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.gewarre n.com.delete> wrote in message
news:bp******** **@ngspool-d02.news.aol.co m...
This should help you. Go to the end of the thread.

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

"Eric Sabine" <mo*****@hyottm ail.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:dropdownli st> 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
2868
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 works fine..when I add to a ListBox the HTML doesn't render the spaces..Anyhelp is appreciated... Tanks Manan
3
6154
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 that appear when user clicks the drop-down arrow button. Because items in the Drop down list are a little long, user can't see the full thing when they pull down the items from the drop down list.
2
12612
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 select any skill in 1st drop down list then i'll select % of this skill in the 2nd list box , based on the percentage i've selected in the 2nd list box it has to display 2 sets of drop down list boxes at run time one for selecting skill and
1
2500
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 box. This all works fine ... what isn't working is when I selected a different item in the first drop down list I want it to automatically reload the items in the second drop down list. I have a funcation called loadNames that laod the second...
4
1706
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 so: COLUMN1 + padding spaces to = 12 total characters | + ' ' COLUMN1 + enough padding spaces to = 12 total characters | ' ' + COLUMN3 I then choose a fixed width font and everything should look like it does in this nice example:
8
7570
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, ProductName, CategoryID, from tblCategoryProducts Where (CategoryID = @CategoryID)
5
18720
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 options by the selected value of first drop down list from MySQL database. For example, the first drop down list contains Animals, Birds... If i select the Animal option, the second drop down list should show like Lion, Tiger.... Both lists should...
4
9288
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 if it works, and if it does not, tell me why it does not work. Thanks.
3
7345
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 document selected (my application uses the BusinessObjects Java Web Services SDK) The 2nd list is dependent on the 1st, while the 3rd list is dependent on the 2nd. In other words, this is what i want my application to do -select a folder from the...
0
8498
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8940
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8630
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5718
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4237
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4434
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2833
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2084
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1831
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.