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
765
Best way to convert each text value displayed in WebDropDown to mixed case before rendering?
posted

I have a WebDropDown that displays a list of names that are in all upper case letters.  This is because that is the format of the names from the data source.  What is the best method to take each name and convert each to mixed case before I display the list on the page?

For example, "SUZIE JONES" should be displayed as "Suzie Jones".

Thank you,

Chris

 

Parents
No Data
Reply
  • 49378
    Suggested Answer
    posted

    Hi Chris,

    Thank you for posting in the community.

    In this scenario I suggest that you handle the DataBound serverside event of WebDropDown in order to implement your text formatting logic. For instance:

        protected void WebDropDown1_DataBound(object sender, EventArgs e)
        {
            for (int i=0; i < WebDropDown1.Items.Count; i++ ){
                WebDropDown1.Items[i].Text = "Formatted text";
            }
        }

    Please let me know if this helps.

Children