ASP.NET gridview control rowCreated function after button click

I am wondering how can I control the execution order of server functions (asp.net and C #) for a post_back request?

For example: I have two buttons on my web page, and clicking on any of them will trigger a post_back request. The post will update the gridview in the AJAXUpdatePanel. I found that if I press the button button1, the order of the functions: button1_onclick (); gridview1_rowCreated ();

However, if I press button 2, the order will be as follows: gridview1_rowCreated (); button2_onClick ();

In any case, so that the order is agreed upon? Any comment is really appreciated.

+3
source share
1 answer

PreRender Clicked Click , ,

if(!IsPostBack) 
{
 Code Binding Grid.
}
0

Source: https://habr.com/ru/post/1792684/


All Articles