Search code examples
asp.netasp.net-ajaxupdatepanel

ASP.Net UpdatePanel refresh after page load


I have a page that has some textboxes that are refreshed everytime page is loaded (Page_Load). Also have a table that takes too long to load (can't make it faster).

I thought using a UpdatePanel to load that table after textboxes are updated. I could use RegisterStartupScript (after textboxes updated) to update the UpdatePanel .

However, the UpdatePanel update always calls Page_Load, so the textboxes are always updated again. It's like UpdatePanel is useless.

How can this be solved?


Solution

  • You can check in Page_Load to see whether it is being called via a partial postback (i.e. from the updatepanel) and if it is then don't update the textboxes.