protected void Page_Load(object sender, EventArgs e) { lws = new LotteryWebService.DBService(); ms = new MailService.Mail(); wsr = new MailService.WebServiceResponse(); wsr1 = new LotteryWebService.WebServiceResponse(); wsr2 = new LotteryWebService.WebServiceResponse(); }
protected void Page_Load(object sender, EventArgs e) { ms = new MailService.Mail(); wsr = new MailService.WebServiceResponse(); string activationCode; try { if (!IsPostBack) { string absoluteurl = HttpContext.Current.Request.Url.AbsoluteUri; int len = absoluteurl.Length; string url = absoluteurl.Substring(len - 10, 10); if (url != "Login.aspx") { if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["ActivationCode"])) { activationCode = HttpContext.Current.Request.QueryString["ActivationCode"]; wsr = ms.VerifyActivationEmail(activationCode); if (wsr.Status == "1") { Response.Redirect("Login.aspx", false); Context.ApplicationInstance.CompleteRequest(); } else { ClientScript.RegisterStartupScript(GetType(), "alert", "alert('" + wsr.Error + "');", true); } } else { Response.Redirect("Signup.aspx", false); Context.ApplicationInstance.CompleteRequest(); } } else { Response.Redirect("Signup.aspx", false); Context.ApplicationInstance.CompleteRequest(); } } } catch (Exception ex) { ClientScript.RegisterStartupScript(GetType(), "alert", "alert('" + ex.Message + "');", true); } }
public void SendMail(Mail mail, string videoTitle) { Console.WriteLine("Mail sent." + videoTitle + " has been compressed "); }