Getting actual value from db on page_load
Ive got 2 controls:
In product list there are products. After clicking on a button buyNow product is added to the basket and number of points on users card is reduced.
In CardInfo there is actual users point count.
The problem is that Im calculating number of points in CardInfo on PageLoad event. It means that its calculated before ProductList_OnClick event so that its always one step to late with showing actual users points count.
How should I go through such a problem ?
Thanks for any hints
Look at the asp.net page life cycle
The control events fire after pageload. A possible solution for your problem is to have the point calculation after the control event such as on PreRender.