<script language="javascript"> $(document).ready(function () { /// ///execute only when a full page refresh. /// }); </script>
ready() function executes only when a page does a full page refresh not when it does a partial page refresh inside a update panel
Solution:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <div class="rounded"> Welcome to AJAX.Net <asp:Button ID="Button1" runat="server" Text="Button" CssClass="button" /> </div> <script type="text/javascript" language="javascript"> Sys.Application.add_load(functionNeedToBeExecuted); function functionNeedToBeExecuted() { // code need to be executed .... } </script> </ContentTemplate> </asp:UpdatePanel>
No comments:
Post a Comment