property String (<= 255) question

Member since: 2008
 

Hi

When I added a String(<=255) property, in there out put html code, there is a <span> </span> added with the value, how to or is it possible to removed the span tag?

 G'day

#27929 Feb 13, 2009 13:19
  • Member since: 2004
     
    <%= CurrentPage.Property["PropertyName"].Value %>
    #27930 Feb 13, 2009 13:38
  • Member since: 2006
     

    Hi Homer.

    If you want to use the <EPiServer:Property> webcontrol, take a look at these blog posts:

    http://labs.episerver.com/en/Blogs/Steve-Celius/Dates/112266/2/Taking-Control-of-Property-Rendering/ 

    http://labs.episerver.com/en/Blogs/Mari-Jorgensen/Dates/112298/3/Replacing-Property-Rendering-Using-Adapters/ 

    Br, Tore

    #27931 Feb 13, 2009 13:45
  • Member since: 2008
     
    Thx guys :)
    #27940 Feb 13, 2009 14:50
  •  

    Be carful with the code below that can break your page: 

    <%= CurrentPage.Property["PropertyName"] %>

    You should always take care to add html encoding:

    <%= HttpUtility.HtmlEncode(CurrentPage.Property["PropertyName"] as string) %>

    Read more: http://blog.fredrikhaglund.se/blog/2008/12/08/epipattern-how-to-render-valid-xhtml-part-12/

     

    #27964 Feb 15, 2009 15:00
  • Member since: 2008
     

    Fredrik, u r so cool :) Still teaching CMS5 beginners course these days?

    Thx for ur comments!!!

    #28052 Feb 18, 2009 14:42
  •  
    Yes, still teaching... and still listening to Schlager ;-)
    #28073 Feb 18, 2009 19:26
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
Please login to post a reply