Click here to Skip to main content
15,919,423 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Can I trigger a function in asp.net? Pin
Abhijit Jana14-Jan-08 22:25
professionalAbhijit Jana14-Jan-08 22:25 
QuestionRe: Can I trigger a function in asp.net? Pin
Pankaj Garg14-Jan-08 22:32
Pankaj Garg14-Jan-08 22:32 
GeneralConsuming assembly from GAC [modified] Pin
Malayil alex14-Jan-08 19:58
Malayil alex14-Jan-08 19:58 
GeneralCookie Pin
.NET- India 14-Jan-08 19:47
.NET- India 14-Jan-08 19:47 
GeneralUse .NET to connect to SAP without creating PROXY. Pin
Tee+14-Jan-08 19:36
Tee+14-Jan-08 19:36 
Questiongridview , button problem Pin
Pankaj Garg14-Jan-08 19:25
Pankaj Garg14-Jan-08 19:25 
Questionsqlcommand.ExecuteScalar() fucntion problem Pin
Pankaj Garg14-Jan-08 19:05
Pankaj Garg14-Jan-08 19:05 
GeneralRe: sqlcommand.ExecuteScalar() fucntion problem Pin
pmarfleet14-Jan-08 19:41
pmarfleet14-Jan-08 19:41 
NewsRe: sqlcommand.ExecuteScalar() fucntion problem Pin
Pankaj Garg14-Jan-08 19:55
Pankaj Garg14-Jan-08 19:55 
Questionhow i can solve this date problem when correct data format is is given Pin
jagan12314-Jan-08 18:22
jagan12314-Jan-08 18:22 
AnswerRe: how i can solve this date problem when correct data format is is given Pin
Pankaj Garg14-Jan-08 18:38
Pankaj Garg14-Jan-08 18:38 
GeneralRe: how i can solve this date problem when correct data format is is given Pin
jagan12314-Jan-08 18:52
jagan12314-Jan-08 18:52 
GeneralRe: how i can solve this date problem when correct data format is is given Pin
Pankaj Garg14-Jan-08 19:07
Pankaj Garg14-Jan-08 19:07 
GeneralRe: how i can solve this date problem when correct data format is is given Pin
jagan12314-Jan-08 19:13
jagan12314-Jan-08 19:13 
AnswerRe: how i can solve this date problem when correct data format is is given Pin
Pankaj Garg14-Jan-08 19:29
Pankaj Garg14-Jan-08 19:29 
GeneralSend Email Asp.net C# error Pin
bpark4414-Jan-08 18:08
bpark4414-Jan-08 18:08 
Hi,

I'm a newbie and am a little stuck.

I am attempting the "easy" task of adding a contact us user form that sends email directly to my accout.

My cs page looks like this:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;



namespace TimePlaces
{
public partial class Contact : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void txtSubmit_Click(object sender, EventArgs e)
{
MailMessage Mail = new MailMessage();
MailAddress ma = new MailAddress(txtEmail.Text, txtName.Text);
Mail.From = ma;
Mail.To.Add("info@timeplaces.com");

Mail.Subject = txtSubject.Text;
Mail.Body = txtBody.Text;

try
{
SmtpClient smtpMailobj = new SmtpClient();
smtpMailobj.Host = "localhost";
smtpMailobj.Send(Mail);
Response.Write("Your email has been sent successfully");
}
catch (Exception ex)
{
Response.Write("Message Delivery Fails");
}

}
}
}

The error I receive when I build then start w/out debugging is:

Compiler Error Message: CS0117: 'ASP.contact_aspx' does not contain a definition for 'txtSubmit_Click'

Can anyone help?

Thanks in advance.

TTG
GeneralRe: Send Email Asp.net C# error Pin
Pankaj Garg14-Jan-08 18:21
Pankaj Garg14-Jan-08 18:21 
GeneralRe: Send Email Asp.net C# error Pin
Unknown Ajanabi14-Jan-08 18:35
Unknown Ajanabi14-Jan-08 18:35 
GeneralChange Password Problem in memebership provider Pin
SreejithAchutan14-Jan-08 17:07
SreejithAchutan14-Jan-08 17:07 
GeneralRe: Change Password Problem in memebership provider Pin
SreejithAchutan14-Jan-08 18:42
SreejithAchutan14-Jan-08 18:42 
QuestionCreate a search function that search my site only Pin
VinothRao14-Jan-08 15:47
VinothRao14-Jan-08 15:47 
GeneralRe: Create a search function that search my site only Pin
Pankaj Garg14-Jan-08 17:30
Pankaj Garg14-Jan-08 17:30 
GeneralRe: Create a search function that search my site only Pin
VinothRao14-Jan-08 19:27
VinothRao14-Jan-08 19:27 
GeneralRe: Create a search function that search my site only Pin
Pankaj Garg14-Jan-08 19:45
Pankaj Garg14-Jan-08 19:45 
QuestionObjectDataSource design question Pin
imak14-Jan-08 11:27
imak14-Jan-08 11:27 

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.