Why is textbox value not creating a hidden item using XSL



XSL:



<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://ift.tt/tCZ8VR">
<xsl:template name="displayUC" match="/">
<xsl:for-each select="/root">
<input type="hidden" value="{cfThe}" id="statThe" runat="server" /> //create hidden item from a radio button
<input type="hidden" value="{txtThe}" id="dateThe" runat="server" /> //create hidden item from a textbox value

<input type="hidden" value="{cfHug}" id="statHug" runat="server" /> //create hidden item from a radio button
<input type="hidden" value="{txtHug}" id="dateHug" runat="server" /> //create hidden item from a textbox value
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>


XML:



<root>
<cfThe>OPEN</cfThe>
<txtThe>0119</txtThe>
<cfHug>CLOSE</cfHug>
<txtHug></txtHug>
</root>


HTML source:



<input type="hidden" value="closeThe" id="statThe" runat="server" />
<input type="hidden" value="openHug" id="statHug" runat="server" />


Why is the hidden value from the textbox not being created?


No comments:

Post a Comment