protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (tbxCode.Text == Session["CaptchaImageText"].ToString())
        {
            if (this.IsValid)
            {
                DataLayer dl = new DataLayer();
                dl.AddNonMember(tbxNonMemberEmail.Text, tbxNonMemberName.Text, true, true);

                SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
                MailMessage mm;
                mm = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To = "[email protected];[email protected]";
                mm.From = "*****@*****.**";
                mm.Subject = "Someone signed up for the RNX free content.";
                mm.Body = tbxNonMemberName.Text + " subscribed to the RNX free content using this email: " + tbxNonMemberEmail.Text;
                SmtpMail.Send(mm);

                Session["resultColor"] = "#007700";
                Session["resultTitle"] = "Success!";
                Session["resultMessage"] = "You have successfully subscribed to the RNX free content!";
                Session["resultReturnURL"] = "Default.aspx";
                Response.Redirect("Result.aspx", true);
            }

        }
        else
        {
            cvInvalidCode.IsValid = false;
        }
    }
示例#2
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (tbxCode.Text == Session["CaptchaImageText"].ToString())
        {
            if (this.IsValid)
            {
                DataLayer dl = new DataLayer();
                dl.AddNonMember(tbxNonMemberEmail.Text, tbxNonMemberName.Text, true, true);

                SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
                MailMessage mm;
                mm            = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To         = "[email protected];[email protected]";
                mm.From       = "*****@*****.**";
                mm.Subject    = "Someone signed up for the RNX free content.";
                mm.Body       = tbxNonMemberName.Text + " subscribed to the RNX free content using this email: " + tbxNonMemberEmail.Text;
                SmtpMail.Send(mm);

                Session["resultColor"]     = "#007700";
                Session["resultTitle"]     = "Success!";
                Session["resultMessage"]   = "You have successfully subscribed to the RNX free content!";
                Session["resultReturnURL"] = "Default.aspx";
                Response.Redirect("Result.aspx", true);
            }
        }
        else
        {
            cvInvalidCode.IsValid = false;
        }
    }
 protected void btnSumbit_Click(object sender, EventArgs e)
 {
     DataLayer dl = new DataLayer();
     dl.AddNonMember(tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNewsletter.Checked);
     Session["resultColor"] = "#009900";
     Session["resultTitle"] = "Subscribed";
     Session["resultMessage"] = "Thanks for subscribing!";
     Session["resultReturnURL"] = "Default.aspx";
     Response.Redirect("Result.aspx", true);
 }
示例#4
0
    protected void btnSumbit_Click(object sender, EventArgs e)
    {
        DataLayer dl = new DataLayer();

        dl.AddNonMember(tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNewsletter.Checked);
        Session["resultColor"]     = "#009900";
        Session["resultTitle"]     = "Subscribed";
        Session["resultMessage"]   = "Thanks for subscribing!";
        Session["resultReturnURL"] = "Default.aspx";
        Response.Redirect("Result.aspx", true);
    }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (lbxNonMembers.SelectedIndex == -1)
     {
         DataLayer dl = new DataLayer();
         dl.AddNonMember(tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNonMemberNewsletter.Checked);
         Session["resultColor"] = "#007700";
         Session["resultTitle"] = "Non-Member Added";
         Session["resultMessage"] = "Non-Member Added Successfuly";
         Session["resultReturnURL"] = "ManageNonMembers.aspx";
         Response.Redirect("Result.aspx", true);
     }
     else
     {
         if (cbxDeleteNonMember.Checked)
         {
             DataLayer dl = new DataLayer();
             dl.DeleteNonMember(lbxNonMembers.SelectedValue);
             Session["resultColor"] = "#007700";
             Session["resultTitle"] = "Non-Member Deleted";
             Session["resultMessage"] = "Non-Member Deleted Successfuly";
             Session["resultReturnURL"] = "ManageNonMembers.aspx";
             Response.Redirect("Result.aspx", true);
         }
         else
         {
             DataLayer dl = new DataLayer();
             dl.UpdateNonMember(lbxNonMembers.SelectedValue, tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNonMemberNewsletter.Checked);
             Session["resultColor"] = "#007700";
             Session["resultTitle"] = "Non-Member Updated";
             Session["resultMessage"] = "Non-Member Updated Successfuly";
             Session["resultReturnURL"] = "ManageNonMembers.aspx";
             Response.Redirect("Result.aspx", true);
         }
     }
 }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (lbxNonMembers.SelectedIndex == -1)
     {
         DataLayer dl = new DataLayer();
         dl.AddNonMember(tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNonMemberNewsletter.Checked);
         Session["resultColor"]     = "#007700";
         Session["resultTitle"]     = "Non-Member Added";
         Session["resultMessage"]   = "Non-Member Added Successfuly";
         Session["resultReturnURL"] = "ManageNonMembers.aspx";
         Response.Redirect("Result.aspx", true);
     }
     else
     {
         if (cbxDeleteNonMember.Checked)
         {
             DataLayer dl = new DataLayer();
             dl.DeleteNonMember(lbxNonMembers.SelectedValue);
             Session["resultColor"]     = "#007700";
             Session["resultTitle"]     = "Non-Member Deleted";
             Session["resultMessage"]   = "Non-Member Deleted Successfuly";
             Session["resultReturnURL"] = "ManageNonMembers.aspx";
             Response.Redirect("Result.aspx", true);
         }
         else
         {
             DataLayer dl = new DataLayer();
             dl.UpdateNonMember(lbxNonMembers.SelectedValue, tbxEmail.Text, tbxName.Text, cbxDailyMotivator.Checked, cbxNonMemberNewsletter.Checked);
             Session["resultColor"]     = "#007700";
             Session["resultTitle"]     = "Non-Member Updated";
             Session["resultMessage"]   = "Non-Member Updated Successfuly";
             Session["resultReturnURL"] = "ManageNonMembers.aspx";
             Response.Redirect("Result.aspx", true);
         }
     }
 }