Click here to Skip to main content
15,917,061 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to expire page when moved to next page.... Pin
SABhatti18-Nov-07 13:20
SABhatti18-Nov-07 13:20 
QuestionAdd keyword and description info to database Pin
Matthew Hansel18-Nov-07 10:22
Matthew Hansel18-Nov-07 10:22 
AnswerRe: Add keyword and description info to database Pin
Not Active18-Nov-07 10:27
mentorNot Active18-Nov-07 10:27 
GeneralRe: Add keyword and description info to database Pin
Matthew Hansel18-Nov-07 11:01
Matthew Hansel18-Nov-07 11:01 
GeneralRe: Add keyword and description info to database Pin
Not Active18-Nov-07 13:27
mentorNot Active18-Nov-07 13:27 
QuestionSending email in ASP.NET 2.0 Pin
nickabradley18-Nov-07 5:18
nickabradley18-Nov-07 5:18 
AnswerRe: Sending email in ASP.NET 2.0 Pin
Christian Graus18-Nov-07 10:40
protectorChristian Graus18-Nov-07 10:40 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley18-Nov-07 10:43
nickabradley18-Nov-07 10:43 
GeneralRe: Sending email in ASP.NET 2.0 Pin
Michael Sync18-Nov-07 15:09
Michael Sync18-Nov-07 15:09 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley18-Nov-07 15:23
nickabradley18-Nov-07 15:23 
GeneralRe: Sending email in ASP.NET 2.0 Pin
Michael Sync18-Nov-07 15:36
Michael Sync18-Nov-07 15:36 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley18-Nov-07 16:07
nickabradley18-Nov-07 16:07 
GeneralRe: Sending email in ASP.NET 2.0 Pin
Michael Sync18-Nov-07 16:27
Michael Sync18-Nov-07 16:27 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley18-Nov-07 16:33
nickabradley18-Nov-07 16:33 
GeneralRe: Sending email in ASP.NET 2.0 Pin
Christian Graus18-Nov-07 17:59
protectorChristian Graus18-Nov-07 17:59 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley19-Nov-07 15:48
nickabradley19-Nov-07 15:48 
I got the code to run (no errors and the page redirects after hitting submit) yet I do not get a email; any idea why?


--- feedback.aspx.cs ---
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void OnSuccess()
{
SmtpClient smtpClient = new SmtpClient("mail.talligewi62.org");
MailMessage message = new MailMessage();

try
{
MailAddress fromAddress = new MailAddress(email.Text, name.Text);
smtpClient.Host = "localhost";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("nickbradley@talligewi62.org");
message.Subject = "Talligewi 62 Website Feedback";
message.Bcc.Add(new MailAddress("banquet@talligewi62.org"));
message.IsBodyHtml = false;
message.Body = lodge.Text + " " + Remarks.Text + " " + Status.Text;
smtpClient.Send(message);
}
catch (Exception ex)
{
}
Response.Redirect("http://www.talligewi62.org");
captcha.Visible = false;
}
protected void OnFailure()
{
captcha.Message = "The text you entered was not correct. Please try again:";
}
}

--- End of File ---

Thanks for your help!

GeneralRe: Sending email in ASP.NET 2.0 Pin
Michael Sync19-Nov-07 15:55
Michael Sync19-Nov-07 15:55 
GeneralRe: Sending email in ASP.NET 2.0 Pin
nickabradley19-Nov-07 16:12
nickabradley19-Nov-07 16:12 
QuestionProblem in sending e-mails [modified] Pin
qmzph18-Nov-07 5:13
qmzph18-Nov-07 5:13 
AnswerRe: Problem in sending e-mails Pin
DigiOz Multimedia18-Nov-07 5:56
DigiOz Multimedia18-Nov-07 5:56 
QuestionProblem uploading files Pin
Zoltan Aszalos18-Nov-07 4:30
Zoltan Aszalos18-Nov-07 4:30 
AnswerRe: Problem uploading files Pin
Hesham Amin18-Nov-07 12:21
Hesham Amin18-Nov-07 12:21 
GeneralRe: Problem uploading files Pin
Zoltan Aszalos18-Nov-07 20:34
Zoltan Aszalos18-Nov-07 20:34 
GeneralRe: Problem uploading files Pin
Hesham Amin21-Nov-07 10:44
Hesham Amin21-Nov-07 10:44 
QuestionSeparate Projects for BLL & DAL Pin
Montu7618-Nov-07 2:37
Montu7618-Nov-07 2:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.