Good day, i making changes in an xslt file.
I have a dropdown on my aspx page with values "Yes & No"
I need to get the selected value to set a var.
I cant seem to get it going, I can return the "Value" but it does give me the selected value
it returns "Yes/No"
Below is what i tried & what i got returned, please help
Code:
<xsl:value-of select="Value" /> = "Yes/No"
<xsl:value-of select="@Name" /> = nothing
<xsl:value-of select="Description" /> = "Description"
<xsl:value-of select="@selectedOption" /> = nothing
<xsl:value-of select="selectedOption" disable-output-escaping="yes" /> = nothing
<xsl:value-of select="selected" disable-output-escaping="yes" /> = nothing
Object
Code:
<xsl:templatename="ListValueType">
<xsl:paramname="Name" />
<xsl:paramname="Attributes" />
<xsl:paramname="Options" />
<xsl:paramname="Value" />
<xsl:elementname="asp:dropdownlist">
<xsl:attributename='id'><xsl:value-ofselect='$Name' /></xsl:attribute>
<xsl:attributename='runat'>server</xsl:attribute>
<xsl:for-eachselect="$Attributes/Attribute">
<xsl:attributename='{@name}'><xsl:value-ofselect='.' /></xsl:attribute>
</xsl:for-each>
<xsl:for-eachselect='$Value/Options/Option'>
<xsl:elementname="asp:ListItem">
<xsl:attributename='Value'><xsl:value-ofselect='.' /></xsl:attribute>
<xsl:iftest="@selected[. = 'true']"><xsl:attributename='selected'>true</xsl:attribute></xsl:if>
<xsl:value-ofselect='.' />
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>