---
title: "How to Solve document.ready on partial Postback not working  in asp.net"  
description: "How to Solve document.ready on partial Postback not working  in asp.net"  
author: "Anonymous User"  
published: 2016-01-04  
updated: 2016-01-04  
canonical: https://www.mindstick.com/forum/33832/how-to-solve-document-ready-on-partial-postback-not-working-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net", "javascript"]  
reading_time: 2 minutes  

---

# How to Solve document.ready on partial Postback not working  in asp.net

I want to know How to Solve [document.ready](https://www.mindstick.com/forum/481/difference-between-onload-and-document-ready) on [partial](https://www.mindstick.com/blog/78/partial-class-in-dot-net) [Postback](https://www.mindstick.com/blog/342/postback-in-asp-dot-net) not working in asp.net.please tell me how to solve this

## Replies

### Reply by Anonymous User

the pageLoad() and $(document).ready() events do the same. \
both methods seem too similar in simple example.\
but $(document).ready() and pageLoad() methods have very much differences in feture.\
I will explain differences between $(document).ready() and pageLoad() methods.

$(document).ready()\
JQuery’s document.ready() method gets called as soon as DOM is ready .\
If your web page has large images, it will not wait for loading of images completely.\
Hence it may called before pageLoad() method. \
We can have multiple document.ready() methods on a single web page which will be called in coming sequence.

```
<script type="text/javascript">         $(document).ready(function () {            $('#id').text('Working document ready');        });</script>
```

pageLoad() method gets called when all resources of the page have been fully loaded. \
if you have large size images on web page then until all the images are not fully loaded on the page, pageLoad() \
method will not called. pageLoad() method is not browser compatible. We can have only one pageLoad() method on a single web page.

```
<script type="text/javascript">        function pageLoad() {            $('#id').text('Working pageLoad');                    }</script>
```

```
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PartialPostBack.aspx.cs" Inherits="Forumasp.PartialPostBack" %>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title></title>    <script src="Scripts/jquery-2.1.4.js"></script></head><body>    <form id="form1" runat="server">    <div>    <script type="text/javascript">        function pageLoad() {            $('#id').text('Working pageLoad');            console.log('clicked');        }        $(document).ready(function () {            $('#id').text('Working document ready');        });</script> <asp:ScriptManager ID="ScriptManger1" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div>    <asp:Label ID="id" runat="server" Text="Label" ClientIDMode="Static"></asp:Label>    <asp:Button ID="btnsubmit" runat="server" Text="Submit"/></div></ContentTemplate>  </asp:UpdatePanel>     </div>    </form></body></html>
```


---

Original Source: https://www.mindstick.com/forum/33832/how-to-solve-document-ready-on-partial-postback-not-working-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
