Sitecore FieldRenderer class attribute

I spent hours trying to figure out how to set the class attribute of images rendered with the Sitecore FieldRenderer. Unfortunately, the CssClass attribute does not work on the FieldRenderer control as it does on the Image WebControl. Long after I had given up and resigned to use <asp:Image>, my colleague figured out a workaround. Until there is a better solution, I’ll use this:

This entry was posted in it and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>