Reputation: 3740
How do i access querystring value in XSLT style sheet.
Say For Example:
my url is : http://localhost:54279/SearchResults.aspx?trip=on&ad=1&ch=0&in=0
...
then how to get value of 1 from "ad"
I tried
<xsl:param name="ad" select="ad" />
<xsl:value-of select ="$ad"/>
But none of them worked..Any help please..
Upvotes: 0
Views: 2992
Reputation: 3428
If you passed the whole url as a parameter
<xsl:param name="url" />
then you could use combination of substring-before and substring-after functions
<xsl:variable name="ad" select="substring-before(substring-after($url,'&ad='),'&')" />
Upvotes: 1