Passing &nbsp in drpdown dataset

V

Vikram

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
 
K

Karl Seguin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top