want_to_be_calm
want_to_be_calm

Reputation: 1627

UpdatePanel always updating time

I have an update panel which is set to conditional mode. As previously the update panel is set to always mode. Now I want to use UpdatePanel.Update() to update the panel. I want to simulate the time that the always mode of updating the update panel. As I know, the always mode will update when the page is a postback. So can I do it page_load and check if it postback then run Update() to simulate the update timing of always mode.

  Page_Load() 
  {
     if page.postback
     {
       UpdatePanel.Update(); 
     } 
  }

Is above conditional updating time is same as always mode updating time?

Upvotes: 0

Views: 50

Answers (1)

Shubham
Shubham

Reputation: 351

 Page_Load() 
  {
     if(Page.IsPostBack)
     {
       UpdatePanel.Update(); 
     } 
  }

This is the condition for running something on each postback

Upvotes: 1

Related Questions