Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1347 posts 1608 karma points
    Feb 20, 2009 @ 20:54
    Gordon Saxby
    0

    Why can't I have asp.net controls in my XSLT?

    Umbraco V4 - why can't I just have -
    [code]

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Feb 22, 2009 @ 23:44
    Lee Kelleher
    0

    Hi Gordon,

    You could try adding ...
    [code]xmlns:asp="http://schemas.microsoft.com"[/code]
    ... to the ...
    [code][/code]
    ... but I'm not 100% sure what you're trying to achieve though.

    Cheers,
    - Lee

  • Gordon Saxby 1347 posts 1608 karma points
    Feb 23, 2009 @ 12:23
    Gordon Saxby
    0

    Basically, I don't want the panel to show if there's nothing in it. So I wanted to have the asp:panel inside an if-then statement inside the XSLT.

    I'll try your suggestion ...

  • Lee Kelleher 3945 posts 15163 karma points MVP 10x admin c-trib
    Feb 24, 2009 @ 18:26
    Lee Kelleher
    0

    Gordon, I'm still curious to why you want to have an ASP.NET control inside an XSLT? As it's going to be treated as text/html and not render as a .NET control.

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Feb 25, 2009 @ 09:44
    Ismail Mayat
    0

    Gorden,

    If you are in v4 then in the template you can do conditional stuff:

    [code]

    <script runat="server"><br />
        umbraco.presentation.nodeFactory.Node node = umbraco.presentation.nodeFactory.Node.GetCurrent();<br />
    </script>


    <%if(node.Id==1220){%>

    <%}%>

    [/code]

    in your case you would have different condition and obviously macro would be panel.

    Regards

    Ismail

  • Gordon Saxby 1347 posts 1608 karma points
    Feb 25, 2009 @ 10:28
    Gordon Saxby
    0

    [quote=leekelleher]Gordon, I'm still curious to why you want to have an ASP.NET control inside an XSLT? As it's going to be treated as text/html and not render as a .NET control.[/quote]
    Ah, I didn't realise / appreciate that!

    As things stand, it shouldn't be a problem as the panel should always have content.

    Thanks Ismail for pointing out a valid way of doing it!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies