protected void lbAddToCart_Click(object sender, EventArgs e) { string response = ""; response = cart.AddItemInCart(Convert.ToInt32(Session["ProductId"])); if (response == "Already") { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "showAlert('Error!','Product is already added.')", true); } else { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "showAlert('Success','Product is added.')", true); this.Master.NoOfProducts = cart.Count.ToString(); } }