473,320 Members | 2,147 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,320 software developers and data experts.

Passing &nbsp in drpdown dataset

i am adding a row in dataset , in which i want to add
  (space chracter for html) and then want to bind
dataset to asp.net dropdown list box. But & automatically
converted to &amp chracter.
Is there any way by which   can be retained as it is
when dropdown throws the html part.

THanks
Nov 19 '05 #1
1 1729
Vikram:
you need to HtmlDecode  

Do something like this:

public static string DecodedSpaces(int numberOfSpaces)
{
string spaces = "";
for (int i = 0; i <= numberOfSpaces; ++i)
{
spaces += "&nbsp;";
}
return HttpUtility.HtmlDecode(spaces);
}

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Vikram" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
i am adding a row in dataset , in which i want to add
&nbsp; (space chracter for html) and then want to bind
dataset to asp.net dropdown list box. But & automatically
converted to &amp chracter.
Is there any way by which &nbsp; can be retained as it is
when dropdown throws the html part.

THanks

Nov 19 '05 #2

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

Similar topics

12
by: Tjerk Wolterink | last post by:
In XHTML the entity nbsp stands for   A normal space like " " is also displayed as an normal space, but multiple spaces like " " are interpreted as 1 space in the xhtml page. So there comes...
12
by: Robert Mark Bram | last post by:
Hi All, I am using the following trim function: function trim (str) { return str.replace(/^\s*/g, '').replace(/\s*$/g, ''); } The problem is that this doesn't trim instances of the...
2
by: Bill Green | last post by:
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...
2
by: Rob T | last post by:
I have a dropdown list that I would like to put in a bunch of &nbsp;'s into it (I'm setting the font to a monospace font so I can show a couple of columns nice and neat). In the old asp days, I...
9
by: Jouni Karppinen | last post by:
I create a HTMLTable in my C# code and then add rows and cells into that table. I'm trying to set top and bottom border for each cell by using stylesheet and it works as far as cell has some text...
6
by: Tina | last post by:
in the itemDatabound event of a datagrid, both null fields and blank string come through as &nbsp; in the e.items.cells field. Is there anyway to tell them apart? Thanks, T
3
by: yawnmoth | last post by:
<? echo 'a'.trim(html_entity_decode('&nbsp;a&nbsp;')).'a'; ?> Shouldn't PHP output aaa? Looking at the documentation for trim I see that it doesn't support chr(0xA0) (eg....
28
by: entfred | last post by:
I have the following line of html: &nbsp;&nbsp1234&nbsp;&nbsp;&nbsp;&nbsp;&nbspabc&nbsp;&nbsp;&nbspyow In Internet Explorer 6.0, the columns look ok using the above html: 1234 abcd ...
7
by: Sebarry | last post by:
Hi, I'm having trouble creating a blank table row in Javascript using document.createElement( '&nbsp;' ). When I look at the generated source it has intrepreted it as <td>&amp;nbsp;</td>. What do I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.