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 & chracter.
Is there any way by which can be retained as it is
when dropdown throws the html part.
THanksVikram:
you need to HtmlDecode
Do something like this:
public static string DecodedSpaces(int numberOfSpaces)
{
string spaces = "";
for (int i = 0; i <= numberOfSpaces; ++i)
{
spaces += " ";
}
return HttpUtility.HtmlDecode(spaces);
}
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Vikram" <anonymous@.discussions.microsoft.com> wrote in message
news:03ca01c515b8$25fef9c0$a501280a@.phx.gbl...
> 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 & chracter.
> Is there any way by which can be retained as it is
> when dropdown throws the html part.
> THanks
Showing posts with label space. Show all posts
Showing posts with label space. Show all posts
Saturday, March 24, 2012
Passing   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 & chracter.
Is there any way by which can be retained as it is
when dropdown throws the html part.
(space chracter for html) and then want to bind
dataset to asp.net dropdown list box. But & automatically
converted to & chracter.
Is there any way by which can be retained as it is
when dropdown throws the html part.
THanksVikram:
you need to HtmlDecode
Do something like this:
public static string DecodedSpaces(int numberOfSpaces)
{
string spaces = "";
for (int i = 0; i <= numberOfSpaces; ++i)
{
spaces += " ";
}
return HttpUtility.HtmlDecode(spaces);
}
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Vikram" <anonymous@.discussions.microsoft.com> wrote in message
news:03ca01c515b8$25fef9c0$a501280a@.phx.gbl...
> 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 & chracter.
> Is there any way by which can be retained as it is
> when dropdown throws the html part.
> THanks
Subscribe to:
Posts (Atom)