Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8387015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:06:01+00:00 2026-06-09T18:06:01+00:00

I have a ASP.net page that is jquery heavy. on this page I have

  • 0

I have a ASP.net page that is jquery heavy.

on this page I have a gridview inside a updatepanel so I can make a asynch update.

<asp:GridView ID="gvMail" runat="server" GridLines="None" 
AutoGenerateColumns="false" Width="100%" OnRowDataBound="mail_RowDataBound"
CssClass="gridview" DataKeyNames="id">


<HeaderStyle HorizontalAlign="Left" />
<RowStyle ForeColor="#0072BC" HorizontalAlign="Left" CssClass="draggable" />

</asp:GridView>

</ContentTemplate>
</asp:UpdatePanel>

<!-- Hidden Link button for Async call back -->
<asp:UpdatePanel ID="updatePanel2" runat="server">
<ContentTemplate>
<asp:LinkButton ID="btnLoadData" onclick="btnLoadData_Click" runat="server" 
 Text="Fill GridView" CssClass="none"></asp:LinkButton> <!-- hidden-->

<a href="javascript: AsyncUpdateGridView()">A sync update</a>
<!-- testing purposes only-->

</ContentTemplate>
</asp:UpdatePanel>

so with this little hack i click hte linkbutton to update the gridview which works fine. Eventually the AsyncUpdateGridView() which just calles the _dopostback method of the hidden linkbutton will be in Javascript.

The problem I have, is my GridView has columns which are Jquery DatePickers and Jquery fancy Drop Down Box’s. They are loaded with this javascript call:

  function OnLoadPage() {
            $(".jqueryselector").selectbox({
                effect: "fade"
            });

            $(".jquerydatepicker").datepicker({ dateFormat: 'dd-mm-yy' });
        }

        $(document).ready(function () {
            OnLoadPage();
        }

The reason I made the OnLoadPage() function was because I tried calling that after I did the _DoPostBack call after the update.

However this doesnt work. So now when the page fist loads, all the jquery datepicker, drop down boxs and other fancy things I have work in the GridView. But after the asynch Callback it reloads with all the default html.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:06:02+00:00Added an answer on June 9, 2026 at 6:06 pm

    $(document).ready is not executed after ajax panel call has finished and html block is updated. You need to register to events provided by asp.net ajax for this. You can use begin_request and end_request for executing some javascript before and afterr ajax call, If you want to call the javascript function after the completion of ajax call you need to use end_request and for before ajax call you need begin_request, More about them over here

       function OnLoadPage() {
            $(".jqueryselector").selectbox({
                effect: "fade"
            });
    
            $(".jquerydatepicker").datepicker({ dateFormat: 'dd-mm-yy' });
        }
    
    
    Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
    
    
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
    
    
    function BeginRequestHandler(sender, args)
    {
    
    }
    
    function EndRequestHandler(sender, args)
    {
         OnLoadPage();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a complex ASP.NET page that makes heavy usage of jquery for DOM
I have an ASP.NET page that calls to a WCF service. This WCF service
I have an ASP.NET page with a jQuery dialog that is displayed to change
I have an ASP .NET page where I use jQuery. I used this function
I have this ASP.NET page with ASP.NET UpdatePanel and jQueryUI droppable and sortable components.
I have an ASP.net mvc page that executes a jquery script on load. The
I have an asp.net web page that has a TinyMCE box. Users can format
With ASP.NET MVC3 (Razor) I have a simple page that loads a jQuery UI
We have a ASP.NET MVC 3 application that uses unobtrusive jQuery validation. The page
Suppose that I have an ASP.NET page, where a customer can select a product

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.