Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
425
How to use special characters
posted

How do I get the control to render text that contains special characters, i.e. those that should be encoded using:

HttpContext

 

.Current.Server.HtmlEncode("<Test>");

The following code results in a blank item:

 

DropDownItem testItem = new DropDownItem();

testItem.Text = "<Test">;

webDropDown.Items.Add(testItem);

 

Thanks.

Parents
No Data
Reply
  • 24671
    posted

    Hi,

    You can use templates for the items:

    either <ItemTemplate> or individual templates per item. In the template code in the ASPX markup you can call HtmlEncode

    Thank you,

    Angel 

Children