コード例 #1
0
ファイル: View.aspx.cs プロジェクト: andrewpallant/Contacts
        /// <summary>
        /// Delete Contact Record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            Contact contact = Contact.getByID(ContactID);

            contact.Delete();

            // Assume Deleted - Should Really Check for return
            Response.Redirect("~/Default.aspx");
        }