In an ASP.net AJAX project (WebForms), I have an UpdatePanel, and in UpdatePanel I have multiple nested Controls with UpdatePanels, basically I have control trees.
The Parent Control is huge and very important part of the site. I cannot touch it, (and also it is reused on many places), the UpdatePanel should remain in its current position.
The child controls in the update panel have functionality's which are separated from each other(also they are separated with UpdatePanel), to be able to refresh just a piece from a control.
Basically on Page_Load() I have code which fulfills every Child control with data, for instance if I have a delete functionality which is modifying the child controls data. The steps are like this:
First showing the control (ParentControl).
- Page_Load() -> Fullfill data
If I click on delete:
Page_Load() -> fullfill data /* Don't want do invoke this here! */
event Delete ->modify data
->fullfill data again!
I need to make a programmatical difference on AsyncPostbacks,and use on Page_Load() function to not invoke the fulfill data when you just want to perform an event.
Outside UpdatePanel you can use IsAsyncPostback,IsCallBack,IsPostback I know this for sure, but these properties don't change on AsyncPostback.
I have 2 AsycPostbacks and I need to make differentiate between them.:
- First this just showing data and initialize.
- Perform an event and making modifications on control
Have somebody know a technique to implement, or some sort of Framework which is having this type of functionality?
Does anybody have this problem?