protected void Page_Load(object sender, EventArgs e) { if (!checkCookie()) Response.Redirect("Login.aspx"); DatabaseHandler obj = new DatabaseHandler(); DataSet ds = obj.GetAllAuctionInfo(); if (ds == null) Label1.Text = "No live auction"; else { GridView1.DataSource = ds; GridView1.DataBind(); } }