Click here to Skip to main content
15,902,114 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
Here is a copy of my feedback.aspx.cs file...

--- 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;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void OnSuccess()
{
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 ---

I believe that the below bit of code will allow me to send the form info back to me in a email (I’m not sure), and I think it would go somewhere in the OnSuccess section of the feedback.aspx.cs file; I just don’t know how to format it to make it work. After they complete the form I need it to send the info back to me and then redirect them to a different page.

SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();

try
{
MailAddress fromAddress = new MailAddress(txtEmail.Text, txtName.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("winterbanquet@talligewi62.org"));
message.IsBodyHtml = false;
message.Body = txtMessage.Text;
smtpClient.Send(message);
}
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 
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 
AnswerRe: Separate Projects for BLL & DAL Pin
Colin Angus Mackay18-Nov-07 2:55
Colin Angus Mackay18-Nov-07 2:55 
AnswerRe: Separate Projects for BLL & DAL Pin
pmarfleet18-Nov-07 8:01
pmarfleet18-Nov-07 8:01 

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.