HTML formatting in Resource files RRS feed

  • Question

  • User763094243 posted

    Hi all,
    I am working on a website in multiple languages and have been using resource files in App_GlobalResources to do this. I have modified the schema as follows to allow html in the values so I can add some formatting to the text -

    <xsd:complexType name="text"> 
    <xsd:complexContent mixed="true"> 
    <xsd:restriction base="xsd:anyType"> 
     <xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> 
     <xsd:attribute ref="xml:lang"/>


    <xsd:element name="data"> 
    <xsd:element name="value" type="text" /> 
    <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> 
     <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> 
    <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
     <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
     <xsd:attribute ref="xml:space" /> 
    Unfortunately as soon as I add any html to the text in the resource file, I can no longer read it, either as an object or string - 
    String text = Global.SiteResourceManager.GetString(textName, culture);
    Anyone know how to do this if it is possible?
    Best wishes,

    Wednesday, November 16, 2011 11:59 AM

All replies

  • User1519636740 posted



    Friday, November 18, 2011 2:45 AM