Beispiel #1
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        connect = new SqlConnect();
        string eid   = TextBox1.Text;
        string ename = TextBox2.Text;
        int    sal   = int.Parse(TextBox3.Text);
        string dep   = DropDownList1.SelectedValue.ToString();
        int    res   = connect.addEmp(eid, ename, sal, dep);

        if (res > 0)
        {
            Response.Redirect("~/Employee.aspx");
        }
        else
        {
            Response.Write("Check Inputs!!");
        }
    }