in an ASP.net/C# application. I am using the an update panel and a Placeholder inside it to dynamically load controls
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="LinkButton1" EventName="Click"/>
</Triggers>
<ContentTemplate>
<asp:PlaceHolder ID="PlaceHolder1" runat="server">
</asp:PlaceHolder>
</ContentTemplate>
</asp:UpdatePanel>
当我点击CLinkButton1 I,在Pord装上用户控制:
protected void LinkButton1_Click(object sender, EventArgs e)
{
PlaceHolder1.Controls.Clear();
MyControl C;
C = (MyControl1 )LoadControl("Controls/MyControl.ascx");
PlaceHolder1.Controls.Add(C);
}
我所有的控制权都是正确的。
但问题是:
I have a control that uses Javascript and Jquery to create a drop down animation when I click on a div. This control works correctly when loaded on a page by a Normal PostBack But When I load it in the update panel using a partial post back, it loads but the javascript stops working (No more drop down animation and other stuff)
我如何在通过部分后退来装载控制时发挥作用?