A
Amie
Hi,
It seems asp.net controls automatically encode the attribute values.
For example, I need to have whitespace in OPTION tag. After binding
data to the dropdownlist, the source html has the following:
<option value="1">&nbsp; North America</option>
Also, when I assign an attribute to a generic html control with
ampersand, it encodes it as well.
<param id="chart_param" name="movie" value="charts.swf?
xml_source=xml.aspx?hID=0&cID=acomChart"></param>
Note that the querystring is broken because of this.
Is there any way to prevent server controls from automatically
encoding the values??
I've tried the following:
- HttpUtility.HtmlDecode
doesn't work cuz any special characters the output has will be encoded
again
- \&
doesn't work in c#
I'd like to avoid overwriting render method of dropdownlist if it's
possible..
Any suggestion is appreciated.
Thanks,
Amie
It seems asp.net controls automatically encode the attribute values.
For example, I need to have whitespace in OPTION tag. After binding
data to the dropdownlist, the source html has the following:
<option value="1">&nbsp; North America</option>
Also, when I assign an attribute to a generic html control with
ampersand, it encodes it as well.
<param id="chart_param" name="movie" value="charts.swf?
xml_source=xml.aspx?hID=0&cID=acomChart"></param>
Note that the querystring is broken because of this.
Is there any way to prevent server controls from automatically
encoding the values??
I've tried the following:
- HttpUtility.HtmlDecode
doesn't work cuz any special characters the output has will be encoded
again
- \&
doesn't work in c#
I'd like to avoid overwriting render method of dropdownlist if it's
possible..
Any suggestion is appreciated.
Thanks,
Amie