Tan Kai Kai

Tan Kai Kai

  • NA
  • 114
  • 43.1k

Got some error

Jul 19 2013 10:01 AM
LinkButton lnkRemove = (LinkButton)sender;
           
            SqlCommand cmd = new SqlCommand();
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "delete from  Catwhere " +
            "ID=@ID;" +
             "select * from Cat";
            cmd.Parameters.Add("@ID", SqlDbType.VarChar).Value
                = lnkRemove.CommandArgument;

            GridView1.DataSource = ds.Tables[0];
            GridView1.DataBind();

I can can delete any thing buy no error come out, I want to delete item from gridview that the user click

Answers (2)