i have repeater with check boxes i wants to delete records when one or more check boxes are checked on button click event
<p>i tried but its not working 
codes are as follows </p>

<pre><code>protected void Button_Click(object sender, CommandEventArgs e)
{
    if (e.CommandName.Equals("Delete"))
    {
        foreach (RepeaterItem item in Repeater2.Items)
        {
            CheckBox chk = (CheckBox)item.FindControl("MyCheckBoxID");

            if (chk.Checked)
            {

               SqlConnection cn1 = new SqlConnection("Data Source=192.168.1.64;Initial Catalog=arvind;User ID=sa;password=platinum50");
               cn1.Open();
                SqlCommand cmd = new SqlCommand("delete * from Employee_Login " ,cn1 ); 

            }
        }
    }
}
</code></pre>

<p>the error is microsoft run time error-form name="Form1" method="post" action="Default.aspx" id="Form1" onsubmit="Check(this)" at this line and saying object is expected</p>
