aspx page
<asp:UpdatePanel ID="asypnl" runat="server">
<ContentTemplate>
<asp:Wizard />
<StartNavigationTemplate>
</StartNavigationTemplate>
<FinishNavigationTemplate>
</FinishNavigationTemplate>
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server">
<asp:Panel runat="server" ID="pnlGiftInfo">
<td>
<asp:DropDownList ID="DropDownPayment" runat="server">
<asp:ListItem Selected="True" Value="0">Gift</asp:ListItem>
<asp:ListItem Value="1">Pledge</asp:ListItem>
</asp:DropDownList>
</td>
</asp:Panel>
</asp:WizardStep>
</WizardSteps>
<asp:Panel runat="server" ID="pnlOutput">
<%-- Content comes from the database OutputHtml Colunm--%>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
DataBase Column
<p>Thank you for your <span id "ddlGift">gift</span><span id "ddlPayment">payment</span> of
{Amount} to the {Comm}
<script type="text/javascript" language="javascript">
var p = document.getElementById("DropDownPayment");
var eledropdownPayment = p.options[p.selectedIndex].value;
var ddlGift = document.getElementById("ddlGift");
var ddlPayment = document.getElementById("ddlPayment");
if (eledropdownPayment == "0") {
ddlGift.style.display = "block";
ddlPayment.style.display = "none";
} else {
ddlGift.style.display = "none";
ddlPayment.style.display = "block";
}
</script>
After submitting the final step in the wizard ctrl I am getting the result to display using the Html tag structure built inside the databse. Everything is working fine except the script in the database its not executing so I can see both the span text. I just want to select the span as per the dropdown selection. I cannot write the script in the aspx as these span tags are not there at the page load event, they get inside the output panel on completion of the 2 steps in the wizard ctrl. I need some way to just display the sapn as per the drop down selection... Thanks. Sorry for the Long description.