finally got the solution here:
protected void Maillist_ItemDeleting(object sender, ListViewDeleteEventArgs e)
{
string id = Maillist.DataKeys[e.ItemIndex].Value.ToString();
SqlConnection conn = new SqlConnection();
conn.ConnectionString = strconn;
string str = "delete from Companymails_Master where Mailid='" + id + "'";
SqlCommand cmd = new SqlCommand(str, conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
populatelistview();
}