0
 protected void btndel_Click(object sender, EventArgs e)
    {
        SqlConnection con123 = new SqlConnection();
        con123.ConnectionString = @"Data Source=viral\sqlexpress;Initial Catalog=mydata23;Integrated Security=True";

        string qu1 = "delete from table_1 where (username='" + txtuser.Text + "', password='" + Txtpass.Text + "')";



        SqlCommand dsa = new SqlCommand(qu1, con123);

        con123.Open();

        dsa.ExecuteNonQuery();


        con123.Close();
        Response.Write("deleted");
    }

SqlConnection con123 = new SqlConnection();

        con123.ConnectionString = @"Data Source=viral\sqlexpress;Initial Catalog=mydata23;Integrated Security=True";



SqlConnection con123 = new SqlConnection();
        con123.ConnectionString = @"Data Source=viral\sqlexpress;Initial Catalog=mydata23;Integrated Security=True";

        string qu1 = "delete from table_1 where (username='" + txtuser.Text + "', password='" + Txtpass.Text + "')";



        SqlCommand dsa = new SqlCommand(qu1, con123);

        con123.Open();

        dsa.ExecuteNonQuery();


        con123.Close();
        Response.Write("deleted");



    string qu1 = "delete from table_1 where (username='" + txtuser.Text + "', password='" + Txtpass.Text + "')";



    SqlCommand dsa = new SqlCommand(qu1, con123);

    con123.Open();

    dsa.ExecuteNonQuery();


    con123.Close();
    Response.Write("deleted");
4
Contributors
3
Replies
18
Views
3 Years
Discussion Span
Last Post by Abhi009
0

change your query of delte .....
string qu1 = "delete from table_1 where username='" + txtuser.Text + "'and password='" + Txtpass.Text + "'"

0

You shuld have specify your exact errors, because different errors have different solutions. Your solution is on the way just try to ask once again........

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.