public void BindData() { if (Request.Cookies["IsLogin"] == null) { HttpCookie c = new HttpCookie("IsLogin", "0"); c.Expires = DateTime.Now.AddDays(Convert.ToDouble(ConfigurationManager.AppSettings["addCookieForDay"])); Response.Cookies.Add(c); } StoreFront ObjStoreFront = new StoreFront(); DataSet ds = new DataSet(); if (Session["UserType"].ToString() == "4") { ds = ObjStoreFront.GetHomePageServices(4); } else { ds = ObjStoreFront.GetHomePageServices(Convert.ToInt32(Session["UserType"].ToString())); } if ((ds.Tables[0].Rows.Count > 0) && (ds.Tables[0].Rows[0]["PetType"].ToString() == "1")) { divCatService.InnerHtml = ds.Tables[0].Rows[0]["Description"].ToString(); imgCatservice.ImageUrl = Session["HomePath"] + "StoreData/HomeServices/" + ds.Tables[0].Rows[0]["ImageName"].ToString(); imgCatservice.ToolTip = ds.Tables[0].Rows[0]["Description"].ToString(); } if ((ds.Tables[0].Rows.Count > 0) && (ds.Tables[0].Rows[1]["PetType"].ToString() == "2")) { divDogService.InnerHtml = ds.Tables[0].Rows[1]["Description"].ToString(); imgDogservice.ImageUrl = Session["HomePath"] + "StoreData/HomeServices/" + ds.Tables[0].Rows[1]["ImageName"].ToString(); imgDogservice.ToolTip = ds.Tables[0].Rows[1]["Description"].ToString(); } }