PK-1825
PK-1825

Reputation: 1489

JavaScript not functioning within Update Panel

why java script not work within update panel, i need add update panel to content place holder in site master in asp.net web form..but all Java script stops functioning in all other pages, is there any solution for this?

 <asp:UpdatePanel ID="updater" runat="server">
          <ContentTemplate>
                <asp:ContentPlaceHolder runat="server" ID="MainContent" />
          </ContentTemplate>
 </asp:UpdatePanel>

Upvotes: 0

Views: 157

Answers (1)

vinayak hegde
vinayak hegde

Reputation: 2222

Add this in your page, it should solve

    <asp:Content ID="Content2" ContentPlaceHolderID="section2" runat="server">
    <script type="text/javascript">
      Sys.Application.add_load(JavascriptFunctionName);
    </script>
   </asp:Content>

Note : if you are calling the same function on page load you can remove

Upvotes: 1

Related Questions