Ejemplo n.º 1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            C_DAL obj = new C_DAL();

            int         id  = Convert.ToInt32(TextBox1.Text);
            List <C_BO> lst = new List <C_BO>();

            lst = obj.ViewCustomerbyid(id);

            GridView1.DataSource = lst;

            if (lst.Count() == 0)
            {
                Response.Write("<script>alert('Customer Id doesnt exist')</script>");
                Label2.Text = "This id doesn't exist";
            }

            GridView1.DataBind();
        }