using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class AsynchronousControlTester : System.Web.UI.Page
{
   

   protected void grdBookList_SelectedIndexChanged(object sender, EventArgs e)
   {
      string isbn = (string)grdBookList.SelectedDataKey.Value;

      myBook.ISBN = isbn;
      myBook.RefreshControlFromAmazon();
   }

   private DateTime _start;
   protected void Page_PreLoad(object o, EventArgs e)
   {
      _start = DateTime.Now;
   }

   protected void Page_LoadComplete(object o, EventArgs e)
   {
      TimeSpan timeTaken = DateTime.Now.Subtract(_start);
      labFooter.Text = "Wyświetlenie tej strony zajęło " + timeTaken.TotalMilliseconds + " milisekund";
   }
}
