Copied to clipboard

Flag this post as spam?

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


  • Profiterole 232 posts 264 karma points
    Aug 27, 2010 @ 15:15
    Profiterole
    0

    Trouble with item:umbraco

    Hi, on my master page I have a scriptmanager and the following line :

    <umbraco:item runat="server" field="bodyText" xslt="umbraco.library:GetXmlNodeById(1282)/data[@alias = 'bodyText']" xsltDisableEscaping="true"/>

    and it's called before subpage (ContentPlaceHolder).

    Everything works on normal page but when I go to a page with a form I got this error :

     

    Only one instance of a ScriptManager can be added to the page.

     

    The trouble comes from umbraco:item line. If it's place after the ContentPlaceHolder it works, but for my design I can't place it after.

    So, what can I do?

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Aug 27, 2010 @ 16:45
    Ali Sheikh Taheri
    0

    Everything works on normal page but when I go to a page with a form I got this error :

    as you have scriptManager on master page you should remove it from subpages.

    you only need one ScriptManager.(try to remove it from subpages under master page).

    It should resolve the problem

    Ali


  • Profiterole 232 posts 264 karma points
    Aug 27, 2010 @ 18:41
    Profiterole
    0

    Yeah, but in all my code I only have one scriptmanager... my probleme occurs only when I place this line :

    <umbraco:item runat="server" field="bodyText" xslt="umbraco.library:GetXmlNodeById(1282)/data[@alias = 'bodyText']" xsltDisableEscaping="true"/> before the scriptmanager.

    So I can't remove it from subpages because there is no scriptmanager in subpage!

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Aug 28, 2010 @ 12:10
    Morten Bock
    0

    I think umbraco automatically includes a scriptmanager when there is a <form runat="server"> tag in the page. So if you already added one yourself, then those might clash.

  • Profiterole 232 posts 264 karma points
    Aug 28, 2010 @ 12:52
    Profiterole
    0

    I tried to remove my scriptmanager, but the my poll need one so it doesn't work. But I got a workaround. Instead of calling the text form my 1282 node with the umbraco:item line, I made a macro with :

    <xsl:value-of select="umbraco.library:GetXmlNodeById(1281)/data[@alias = 'bodyText']" disable-output-escaping="yes"/>

    and called the macro. It does the result I want. But I think it's a strange behavior...

    Thank you guys!

Please Sign in or register to post replies

Write your reply to:

Draft