Copied to clipboard

Flag this post as spam?

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


  • Bruno 30 posts 50 karma points
    May 24, 2010 @ 17:27
    Bruno
    0

    How i can pass two arguments in a link?

    Example:

     

    <xsl:if test="$pageNumber &gt; 1">
                <span class="spanLink"><a href="?page={$pageNumber -1}&orderby={$orderby}">&#171; Prev</a></span>
    </xsl:if>

    Error occured.

     

  • Bruno 30 posts 50 karma points
    May 24, 2010 @ 17:27
    Bruno
    0

     Error Occured: System.Xml.XmlException: '=' is an unexpected token. The expected token is ';'.

  • Dan 1285 posts 3917 karma points c-trib
    May 24, 2010 @ 17:39
    Dan
    0

    Hi Bruno,

    Try something like this:

    <xsl:if test="$pageNumber &gt; 1">
    <span class="spanLink">
    <a>
    <xsl:attribute name="href">?page=<xsl:value-of select="$pageNumber"/>&amp;orderby=<xsl:value-of select="$orderby"/></xsl:attribute>
    &#171; Prev
    </a>
    </span>
    </xsl:if>
  • Jeff Grine 149 posts 189 karma points
    May 24, 2010 @ 17:42
    Jeff Grine
    1

    What you had is fine, except you need to encode the ampersand as &amp;

  • Sean Mooney 131 posts 158 karma points c-trib
    May 24, 2010 @ 17:42
    Sean Mooney
    0

    @Bruno

    your code is correct you just need to encode the ampersand.

    So & > &amp;

    <span class="spanLink"><a href="?page={$pageNumber -1}&amp;orderby={$orderby}">&#171; Prev</a></span>
  • Tommy Poulsen 514 posts 708 karma points
    May 24, 2010 @ 17:43
    Tommy Poulsen
    0

    Hi Bruno

    the problem is the & in your condiftion - use &amp; instead


    <xsl:if test="$pageNumber &gt; 1">
                <span class="spanLink"><a href="?page={$pageNumber -1}&amp;orderby={$orderby}">&#171; Prev</a></span>
    </xsl:if>

    >Tommy

  • Bruno 30 posts 50 karma points
    May 24, 2010 @ 17:54
    Bruno
    0

    Thanks a lot man´s. Dan, Jeffy, Sean, Tommy it´s work ;)

Please Sign in or register to post replies

Write your reply to:

Draft