Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Will 4 posts 24 karma points
    Jun 20, 2011 @ 11:57
    Will
    0

    Umbraco Item in HTMLGenericControl

    Hi,

    I am trying to reference umbraco fields in my html in order to set various piece of text/paths to images.

     when I try and set the a back ground image of a div using an umbraco field, i receive the following problem, this is the line in my master page.

    <div class="test-name" style="background:url('<umbraco:Item ID="temp1223" field="leftHandTitleGraphic" runat="server" />') no-repeat 0 0;">

    Then the error I receive @ runtime is this

    The base class includes the field 'temp1223', but its type (System.Web.UI.HtmlControls.HtmlGenericControl) is not compatible with the type of control (umbraco.presentation.templateControls.Item).

    When i change the ID, the problem dissappears, this generally seems to happen when i do a rebuild but can happen when i do a normal build

     

    Any help would be great thanks

     

    Will

     

     

Please Sign in or register to post replies

Write your reply to:

Draft