protected void Page_Load(object sender, EventArgs e)
        {
            if (Cache["Data"] != null)
            {
                Label1.Text = "From Cache";
                GridView1.DataSource = Cache["Data"];
                GridView1.DataBind();
            }
            else
            {
                Label1.Text = "From List";
                Employee emp = new Employee();
                GridView1.DataSource = emp.GetEmployees();
                GridView1.DataBind();
                Cache["Data"] = emp.GetEmployees();
                Cache.Insert("Data", emp.GetEmployees());
   CacheDependency cd = new CacheDependency(Server.MapPath("myfile.txt"));
   Cache.Insert("Data", emp.GetEmployees(), cd, DateTime.Now.AddSeconds(20), Cache.NoSlidingExpiration);

            }


            ////       throw new InvalidOperationException("An InvalidOperationException " +
            ////"occurred in the Page_Load handler .");
        }
        void Application_Start(object sender, EventArgs e)
        {
            // Code that runs on application startup
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            Employee emp = new Employee();
            Application["EmployeeList"] = emp.GetEmployees();

        }
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     Employee employ = new Employee();
     List<Employee> empList = employ.GetEmployees();
     foreach (var emp in empList)
     {
         if (txtusrname.Text == emp.Username && txtpw.Text == emp.Password)
         {
             lblmsg.Visible = false;
             Session["Username"] = emp.Username;
             Session["Password"] = emp.Password;
             Session["Teamname"] = emp.Teamname;
         }
         else
         {
             lblmsg.Visible = true;
             lblmsg.Text = "Incorrect Login";
         }
     }
     LoginClick(sender, e);
 }