Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 18, 2010 @ 18:25
    Ismail Mayat
    0

    macro and item issue when head runat server

    Hello,

    I am using contour and i have field that is date.  When form was rendering the calendar was not popup.  Was informed by Tim Geyssens that add runat server on your head tag and calendar will be popup.  That works however in my head tag i have macros and umbraco:item tags they now render out as literal text as opposed to executing.  Anyone else had this issue?

    Regards


    Ismail

  • Comment author was deleted

    May 19, 2010 @ 08:32

    Hi Ismail,

    Sounds like fixing one problems ends up in another. But sounds like this is more an umbraco core related issue.

    Unfortunalty the default calendar control in Contour requires the runat='head' attribute if you want it in 'ajax style'.

    If you want to create your own calendar control that doesn't require the attribute, the easies way would be to simply have some Jquery adding a calendar to a textbox field type

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    May 19, 2010 @ 12:28
    Ismail Mayat
    0

    Tim,

    Have you put this is issue on codeplex or do you want me to do it?

    Regards

    Ismail

  • Bex 444 posts 555 karma points
    Aug 31, 2010 @ 15:44
    Bex
    0

    Was a work around ever found for this problem

  • Connie DeCinko 931 posts 1160 karma points
    Dec 21, 2010 @ 22:29
    Connie DeCinko
    0

    I too need to know what the resolution is for this problem.  This only appears to cause an issue with older browsers.  In order to stop them from throwing an error, I have to add runat="server" to my head tag.  That then causes macros in my head to fail.

     

  • Josh Olson 79 posts 207 karma points
    Sep 03, 2013 @ 10:01
    Josh Olson
    0

    Resurrecting an old thread here, but I found something that works to 'fix' the problem. And, before anyone yells at me, I know that what I am doing is wrong and should never be done... just saying that so far it works...

    <asp:Content ContentPlaceHolderId="mainContainer" runat="server">
        <head runat="server">
        </head>
        <form id="primary" runat="server">
            <umbraco:Macro FormGuid="7911f888-0b3d-4182-95de-0a5d310a2769" Alias="umbracoContour.RenderForm" runat="server"></umbraco:Macro>
        </form>
    </asp:Content>
    

    For those who don't see the bad, non-valid markup above, what I have done is add a second head tag right before the macro. This means that not only do I have two head tags (very bad), the second head tag is nested inside a body tag (also very bad).

    When the page is rendered in the browser, the markup of the first head tag remains intact, and the second head tag looks like this:

    <head><link href="/umbraco/plugins/umbracoContour/css/defaultform.css" rel="stylesheet" type="text/css" /><link href="/WebResource.axd?d=yV6nzYHXgcJQ_9EhLbj4a4MAD-UtBuzxMaKsn0bNTS5fk-cdDjtbOWQKBRJlxmPaZdei4zzjh6HcT52gW1QNAUJIYQQ8A3dx611Ej1yTtuQvoBHcMa_zW5IUqzEHjxZ1yr8moA9e6gLl-QGVyGQo7rfK8ckcjDmPr_LavFzBaaw1&amp;t=635121765368913775" type="text/css" rel="stylesheet" /><title></title></head>
    

    Again, I know this is bad, and it will not make it into my production site, but so far it has not broken anything else in my development site and renders properly on Chrome, FF, and IE (all updated as of SEP 2013).

    Cheers!

  • Comment author was deleted

    Sep 11, 2013 @ 15:16

    Or just use the razor macro that is part of Contour 3 and no more webforms ;)

Please Sign in or register to post replies

Write your reply to:

Draft