I have an asp.net panel that is initially hidden and appears when a button is clicked. There is javascript inside the panel, and it does not execute after the panel is configured for visibility. I see that the javascript function is being output to the page, but it is not being called. What can I do to call a function call? Here is an example:
<asp:LinkButton id="lbtn" runat="server" Text="show" OnClick="lbtn_Click" />
<asp:UpdatePanel id="upnl" runat="server" UpdateMode="Conditional">
<contenttemplate>
<asp:panel id="pnlContent" runat="server" visible="false">
content initially hidden.
<script>
alert('done!');
</script>
</asp:panel>
</contenttemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="lbtn"/>
</triggers>
</asp:UpdatePanel>
source
share