Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Reporting > Telerik Reporting > An error has occurred while processing HtmlTextBox 'txtGroup_11': 'EN-AU' is an unexpected token. The expected token is '"' or '''.

Not answered An error has occurred while processing HtmlTextBox 'txtGroup_11': 'EN-AU' is an unexpected token. The expected token is '"' or '''.

Feed from this thread
  • RkW avatar

    Posted on Feb 22, 2012 (permalink)

    I am getting above error when trying to assign below string to HtmlTextBox.

    "question 1 (tips: <P><SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA" lang=EN-AU><SPAN style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-AU; mso-fareast-language: EN-US; mso-bidi-language: AR-SA" lang=EN-AU>After this is</SPAN></SPAN></P>)"

    Telerik.Reporting.HtmlTextBox txtBox = new Telerik.Reporting.HtmlTextBox();
    txtBox.Value = value;
    In the above code value is equal to above string. How can I solve this error?

    Also I want to know how to use StripHTMLTags function. Or if there is any other way to remove HTML tags.

    HtmlTextBox1.Value = StripHTMLTags(IncomingHTMLText);

    Above doesn't work. It gives an error saying that StripHTMLTags  is not found.

    Help would be appreciated....

    Reply

  • RkW avatar

    Posted on Feb 23, 2012 (permalink)

    Can someone please give me a solution?

    Reply

  • Milen Milen admin's avatar

    Posted on Feb 24, 2012 (permalink)

    Hi Rak,

    As stated in the help article HtmlTextBox - XHTML Validation you need to provide a valid XHTML for the value of our HtmlTextBox item. What does not comply with this rule in your code is the attribute lang=EN-AU where the value of the attribute is not surrounded in quotation marks. This is the cause of the error you receive: 'EN-AU' is an unexpected token. The expected token is '"' or '''. Line 1, position 228.

    The function StripHtmlTags is a built-in function, part of our expression engine, which strips all html tags from its string argument, returning the plain text, the text nodes extracted from the given html.

    For example the expresion:
    =StripHtmlTags("Hi <b>John</b>")

    will result in the plain text:
    Hi John

    Note that the function may be only used as part of an expression, not in your compiled code.

    More information and complete reference of all available built-in functions you may find in our help article Developer Reference - Functions.

    Kind regards,
    Milen
    the Telerik team
    NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Reporting > Telerik Reporting > An error has occurred while processing HtmlTextBox 'txtGroup_11': 'EN-AU' is an unexpected token. The expected token is '"' or '''.
Related resources for "An error has occurred while processing HtmlTextBox 'txtGroup_11': 'EN-AU' is an unexpected token. The expected token is '"' or '''."

Features  |  Documentation  |  Demos  |  Telerik TV  |  Knowledge Base  |  Code Library  |  Step-by-step Tutorial  |  Blogs  |  Whitepaper  ]