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;

using FourLayer.BusinessEntity;

public partial class UsingApplicationState : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       if (!IsPostBack)
       {
          panCount.Visible = false;
       }


    }
   protected void btnShow_Click(object sender, EventArgs e)
   {
      panCount.Visible = true;

      int count = (int)Application["Count"];
      string name = (string)Application["SiteName"];

      labCount.Text = count.ToString();
      labName.Text = name;

      // powiąż listę globalnych wydawców z kontrolką GridView
      grdPublishers.DataSource = ASP.global_asax.AllPublishers;
      grdPublishers.DataBind();
   }
}
