Example #1
0
        /// <summary>
        /// provide behavior for the send button
        /// </summary>
        /// <param name="sender">sender object</param>
        /// <param name="e">event argument</param>
        protected void btnContactMsgSend_Click(object sender, EventArgs e)
        {
            Name         = txtName.Text;
            EmailAddress = txtEmailAddress.Text;
            Subject      = txtSubject.Text;
            MessageBody  = txtMssgBody.Text;

            Session["Name"]        = Name.ToString();
            Session["Email"]       = EmailAddress.ToString();
            Session["Subject"]     = Subject.ToString();
            Session["MessageBody"] = MessageBody.ToString();

            try
            {
                Response.Redirect("~/UserPages/ContactUsConfirm.aspx");
            }
            catch (Exception ex)
            {
                Session["Error"] = ex;
                Response.Redirect("~/UserPages/ContactUsConfirm.aspx");
            }
        }