asp:image button is not working
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/button_search.gif" OnClick="ImageButton1_Click" />
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
SqlCommand myCommand = new SqlCommand("sp_login", sqlcon);
myCommand.CommandType = CommandType.StoredProcedure;
SqlParameter username = new SqlParameter("@username", SqlDbType.VarChar, 250);
username.Value = txtusername.Text;
myCommand.Parameters.Add(username);
SqlParameter password = new SqlParameter("@password", SqlDbType.VarChar, 250);
password.Value = txtpassword.Text;
myCommand.Parameters.Add(password);
dr = myCommand.ExecuteReader();
if (dr.Read())
{
Response.Redirect("Permanentlogin.aspx");
}
sqlcon.Close();
}