I tried this, but it doesn't work. I think because it is a dropdown and not a regular hyperlink...
Code:<xsl:template name="DepartmentDropDown"> <select> <option value="Select">View All</option> <xsl:for-each select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[ParentEntityID=/root/Runtime/EntityID]"> <xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)"></xsl:variable> <option value="{aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')}"> <a href="{aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')}"> <xsl:value-of select="$scName" disable-output-escaping="yes"/> </a> </option> </xsl:for-each> </select> </xsl:template>
Does anyone know how to add the link to each dropdown item dynamically? Sorry... but I am not very familiar with this at all.![]()
Sorry Mate - I have been (& still am) ill in bed.
The second article I linked to has it all for you...
I haven't tested it - but this should work :-
C#/VB.NET Code:<xsl:template name="BFG-DropDown">
<form name="jump1">
<select name="myjumpbox"
OnChange="location.href=jump1.myjumpbox.options[selectedIndex].value">
<option value="Select">Select One</option>
<xsl:for-each select="/root/EntityHelpers/*[name()=/root/Runtime/EntityName]/descendant::Entity[ParentEntityID=/root/Runtime/EntityID]">
<xsl:variable name="scName" select="aspdnsf:GetMLValue(Name)"></xsl:variable>
<option value="{aspdnsf:EntityLink(EntityID, SEName, $EntityName, 0, '')}"><xsl:value-of select="$scName" disable-output-escaping="yes"/></option>
</xsl:for-each>
</select>
</form>
</xsl:template>
TTFN
BFG