1

I have put some Jquery code in a user control and it is placed in a page with updatepanel.

On a button click on a page User Control Grid is displayed.

document.ready event doesn't get fired in user control after partial post back.

How do I handle it?

I am following this link but didn't get solution to my problem.

Community
  • 1
  • 1
Dee
  • 1,393
  • 4
  • 20
  • 37
  • That link is the way you hook into the "UpdatePanel finished" event...what isn't it doing correctly? What are you trying to do after the partial postback? – Nick Craver Aug 25 '10 at 10:41
  • After partial postback user control get rendered(displays records in UC grid).I have put a alert in document.ready in UC but it never shows. – Dee Aug 25 '10 at 11:21

1 Answers1

0

Call jquery code after partial postback:

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) {
    if (args.get_error() == undefined) {
        // add your functions here
    }
}
Prasad Jadhav
  • 5,090
  • 16
  • 62
  • 80