protected void Page_Load(object sender, EventArgs e) { DAL = new CAccesscounter(); if (!Page.IsPostBack) { if (Session["ACCESSCOUNTER"] == null) { DAL.Updatetotal(); Session.Add("ACCESSCOUNTER", 1); } this.Count_Total(); this.Count_Current(); //this.Count_Pageview(); } }
private void Count_Total() { try { currentaccess.Text = ((int)Application["CurrentAccess"]).ToString(); CAccesscounter DAL = new CAccesscounter(); AccesscounterInfo icounter = DAL.Getinfototal(); if (icounter == null) icounter = new AccesscounterInfo(); List<AccesscounterInfo> list = new List<AccesscounterInfo>(); list.Add(icounter); (new GenericList<AccesscounterInfo>()).Bind_DataList(rptList, null, list, 0); return; } catch (Exception ex) { throw ex; } }