protected void Page_Load(object sender, EventArgs e) { if (Session["User"] == null) { Response.Redirect("../Login.aspx"); } string uname = Session["User"].ToString(); if (bl.getissuedbooks(uname) == null) { //no books found } else { listvie1.DataSource = bl.getissuedbooks(uname); listvie1.DataBind(); } }