Getting actual value from db on page_load

Ive got 2 controls:

  • ProductList
  • CardInfo

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 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.

Need Your Help

Mvvmcross Presenter in Android

android monodroid xamarin mvvmcross

I am working on mvvmcross framework and try to learn it. I have some difficulties when to develop Android project.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.