473,382 Members | 1,692 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,382 software developers and data experts.

Ampersands being converted when in data that is bound to my ASP:Dropdown

I am binding data to the <ASP:Dropdown> object. My field that I am binding
to the DataTextField property has "&nbsp;" in the data out of the database.
The problem that I am having is that when the page is rendered to the
browser, the "&nbsp;" is changed to "&amp;nbsp;". Is there a way to stop
the conversion of my data? What I am trying to accomplish is to have some
drop down items to be tabbed in. So, if you know how to tab items in a
dropdown, that can also solve my issue.
--
Brett Howard
bj*******@JoiMail.com
Nov 17 '05 #1
2 1764
Hi

Assume the DropDownList ID is MenuList. The following code will add Space to
the ListItem :

MenuList.Items.Add(new
ListItem(Server.HtmlDecode("&nbsp;&nbsp;UserGroup" ),"UserGroup"));

HTH
Prasad
"Howard, Brett" <br**********@NOSPAMtroutmansanders.com> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I am binding data to the <ASP:Dropdown> object. My field that I am binding to the DataTextField property has "&nbsp;" in the data out of the database. The problem that I am having is that when the page is rendered to the
browser, the "&nbsp;" is changed to "&amp;nbsp;". Is there a way to stop
the conversion of my data? What I am trying to accomplish is to have some
drop down items to be tabbed in. So, if you know how to tab items in a
dropdown, that can also solve my issue.
--
Brett Howard
bj*******@JoiMail.com

Nov 17 '05 #2
Hi

Assume the DropDownList ID is MenuList. The following code will add Space to
the ListItem :

MenuList.Items.Add(new
ListItem(Server.HtmlDecode("&nbsp;&nbsp;UserGroup" ),"UserGroup"));

HTH
Prasad
"Howard, Brett" <br**********@NOSPAMtroutmansanders.com> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
I am binding data to the <ASP:Dropdown> object. My field that I am binding to the DataTextField property has "&nbsp;" in the data out of the database. The problem that I am having is that when the page is rendered to the
browser, the "&nbsp;" is changed to "&amp;nbsp;". Is there a way to stop
the conversion of my data? What I am trying to accomplish is to have some
drop down items to be tabbed in. So, if you know how to tab items in a
dropdown, that can also solve my issue.
--
Brett Howard
bj*******@JoiMail.com

Nov 17 '05 #3

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

Similar topics

1
by: wk6pack | last post by:
Hi, I would like to know if this is possible. I'm using ASP with JSCRIPT. I have a dropdown box that when the use selects a particular value, I would like the textbox to become visible....
1
by: Ian Davies | last post by:
Hello In a php file I have a drop down list with index numbers in whos default value is feed into an sql query that filters records from my database and displays them in an html table. Trouble...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
2
by: estafford | last post by:
I have a dropdownlist control that is filled using a database query. I also want to add an additional option to the list that is not pulled from the database. How can I go about doing that? ...
2
by: Max2006 | last post by:
Hi, I have a DropDown bound to a DataTable and I would like to add "Please Choose" as the 1st default item. I know that I can add "Please Choose" to the DataTable; but I wonder if I do the same...
2
by: arifshuailahamed | last post by:
how to display the list of logical drives in the combo box for DropDown event..? can any body help me?
1
by: gopim | last post by:
i write the code like this function show() { var subject=document.getElementById('<%=ddlsubject.ClientID %>'); var txtsubject=document.getElementById('<%=TextBox1.ClientID%>');...
6
by: fran7 | last post by:
Hi, Would anyone know how to populate an asp dropdown with a dependant condition. I need this dropdown to select only artists, ie from the authortwo field where in another field, ie extrathree, ...
0
by: Chetana | last post by:
Hi All, I have one asp.net site and my page gets refershed on selection of dropdowns from that page. I want not to refersh the page .how i will do this. and i have made autopostback=true because...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.