none
SharePoint Designer Data View adds special characters to content from a list RRS feed

  • Question

  • Hello

    I created a new ASPX page in SharePoint Designer, added a DataView with a data source pointing to a list. I noticed in the columns the values being displayed have special characters like 4;# and 5;# etc.

    Example:

    4;#SharePoint Testing Tools

    5;#Microsoft Testing Tool A

    On some occasions even a person's name has a 1;# at the beginning of their name.

    How can I get rid of the special characters?

    Thank you.

    Regards,

    Yoshi

    Thursday, September 13, 2012 5:41 AM

Answers

  • Hello

    I managed to solve this problem but using the 'IndexOf' function in C# to get rid of special charanters such as #.

    Example:

    string name = "54#Yoshimitsu";

    Solution:

    int index = name.ToString().IndexOf('#');
    string newName = name.ToString().Substring(index + 1);

    Output:

    Yoshimitsu

    Regards,

    Yoshi

    Monday, September 24, 2012 1:02 AM

All replies