예제 #1
0
 protected void btnSubscribe_Click(object sender, EventArgs e)
 {
     string emailid = txtemail.Text;
     string date = DateTime.Now.ToString("dd/MM/yyyy");
     if (emailid != "")
     {
         int success = 0;
         success = local_product.AddNewSubscribe(emailid, date);
         if (success != 0)
         {
             txtemail.Text = "";
             lblMessageSubscribe.ForeColor = Color.White;
             lblMessageSubscribe.Text = "Message Send Successfully";
             ViewState["ID"] = null;
         }
         else
         {
             lblMessageSubscribe.ForeColor = Color.White;
             lblMessageSubscribe.Text = "Message Send Failed";
         }
     }
 }