protected void Button1_Click(object sender, EventArgs e) { if (addupflag == 1) { Button1.Text = "Add"; if ((TextBox1.Text == "") || (TextBox2.Text == "")) { Label4.Text = "User name and password can't be empty"; TextBox1.Focus(); } else { int cnt = ListBox1.Items.Count; dt1.Clear(); dt1 = g1.Addusers(TextBox1.Text.ToString(), TextBox2.Text.ToString(), DropDownList1.SelectedValue); LoadAddresource(dt1); TextBox1.Text = ""; TextBox2.Text = ""; TextBox1.Focus(); } } else { dt1.Clear(); dt1 = g1.Upadteusers(TextBox1.Text.ToString(), TextBox2.Text.ToString(), DropDownList1.SelectedValue); LoadAddresource(dt1); Button2.Enabled = false; TextBox1.Text = ""; TextBox2.Text = ""; Button1.Text = "Add"; addupflag = 1; TextBox1.Enabled = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)