realtek
realtek

Reputation: 841

UpdatePanel not working when loaded inside a jQuery ajax call

I have an aspx page which is loaded via a jQuery ajax call.

On this aspx page, I also have an updatepanel.

When I test it, the update panel does not work but if I access the page directly it works.

Does anyone know why it would not work this way? Thanks

Upvotes: 0

Views: 334

Answers (1)

Don
Don

Reputation: 6852

If by loading "aspx page using jQuery ajax call.", you mean the following: - Use jQuery ajax to retrieve the page content - Display the page content using $element.html(responseFromAJax)

Then, this will not work for a number of reasons, one of them being: - The javascript scripts passed in the HTML response will not be loaded and executed. And the javascript is what is responsible for performing ajax postbacks in ASP.NET Update Panels

Your option would be to navigate to the page via javascript (as follows or similar): window.location = 'aspx page url';

Upvotes: 1

Related Questions