Click here to Skip to main content
15,887,446 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to filter data in DataTable using like operator ? Pin
aarif moh shaikh26-Feb-16 21:04
professionalaarif moh shaikh26-Feb-16 21:04 
Questionhow to bind Database field value in textbox based on choosing dropdownlist selected value in asp.net MVC Pin
Nithu Nithiya23-Feb-16 18:06
professionalNithu Nithiya23-Feb-16 18:06 
AnswerRe: how to bind Database field value in textbox based on choosing dropdownlist selected value in asp.net MVC Pin
John C Rayan27-Feb-16 21:39
professionalJohn C Rayan27-Feb-16 21:39 
QuestionDownload file from memorystream by client side click Pin
indian14323-Feb-16 13:33
indian14323-Feb-16 13:33 
AnswerRe: Download file from memorystream by client side click Pin
Richard MacCutchan23-Feb-16 21:29
mveRichard MacCutchan23-Feb-16 21:29 
GeneralRe: Download file from memorystream by client side click Pin
indian14324-Feb-16 7:21
indian14324-Feb-16 7:21 
QuestionDropdownlist with Model (MVC4,C#, ASP.Net2015,Razor) Pin Pin
bl4ckeagle23-Feb-16 8:12
bl4ckeagle23-Feb-16 8:12 
QuestionFeedback form on my website to email feedback Pin
Member 1033668221-Feb-16 11:03
Member 1033668221-Feb-16 11:03 
I need help please programmers, i need help i don't understand smtp.

____________________________________________
C#
protected void Unnamed6_Click(object sender, EventArgs e)
          {

              MailMessage mailMsg = new MailMessage();
              SmtpClient smtp = new SmtpClient();
            try
            {
                mailMsg.From = new MailAddress(Email.Text);

                mailMsg.To.Add("admin@mydomain.co.za");

                mailMsg.IsBodyHtml = false;

                mailMsg.Subject = "Contact Details";

                mailMsg.Body = "Contact Details" + "<b>Name:</b>" + names.Text + " <br/> <b>Email - address :</b>" + Email.Text + "<br/> <b>Comments :</b>" + mgs.Text;



                mailMsg.Priority = MailPriority.High;
                smtp.Host = "localhost";
                smtp.Port = 25;

                smtp.Credentials = new System.Net.NetworkCredential();

                smtp.Timeout = 25000;

                smtp.EnableSsl = true;

                smtp.Send(mailMsg);

                lblStatus.Text = "Thank you. Your contact details and feed back has been submitted.";


            }
            catch (Exception ex)
            {
                lblStatus.Text = "Send Email Failed." + ex.Message;
            }

}

---------------------------------------------------------------
Here is an output==

C#
Send Email Failed.Failure sending mail.

AnswerRe: Feedback form on my website to email feedback Pin
Richard MacCutchan21-Feb-16 22:07
mveRichard MacCutchan21-Feb-16 22:07 
GeneralRe: Feedback form on my website to email feedback Pin
Member 1033668222-Feb-16 3:19
Member 1033668222-Feb-16 3:19 
GeneralRe: Feedback form on my website to email feedback Pin
bVagadishnu22-Feb-16 9:37
bVagadishnu22-Feb-16 9:37 
GeneralRe: Feedback form on my website to email feedback Pin
F-ES Sitecore22-Feb-16 22:31
professionalF-ES Sitecore22-Feb-16 22:31 
QuestionProblem ASP.NET MVC in IIS, RedirectToAction() and Redirect() Pin
Viadi21-Feb-16 3:48
Viadi21-Feb-16 3:48 
AnswerRe: Problem ASP.NET MVC in IIS, RedirectToAction() and Redirect() Pin
2374121-Feb-16 5:31
2374121-Feb-16 5:31 
QuestionI want to scan barcode for product management Pin
Anh Tuấn19-Feb-16 17:53
Anh Tuấn19-Feb-16 17:53 
AnswerRe: I want to scan barcode for product management Pin
aarif moh shaikh19-Feb-16 20:48
professionalaarif moh shaikh19-Feb-16 20:48 
GeneralRe: I want to scan barcode for product management Pin
Anh Tuấn19-Feb-16 20:54
Anh Tuấn19-Feb-16 20:54 
AnswerRe: I want to scan barcode for product management Pin
Richard MacCutchan19-Feb-16 23:34
mveRichard MacCutchan19-Feb-16 23:34 
QuestionMCV How To? Controller Action that doesn't do anything Pin
Foothill19-Feb-16 10:03
professionalFoothill19-Feb-16 10:03 
AnswerRe: MCV How To? Controller Action that doesn't do anything Pin
Richard Deeming19-Feb-16 11:03
mveRichard Deeming19-Feb-16 11:03 
GeneralRe: MCV How To? Controller Action that doesn't do anything Pin
Foothill19-Feb-16 11:13
professionalFoothill19-Feb-16 11:13 
GeneralRe: MCV How To? Controller Action that doesn't do anything Pin
Richard Deeming20-Feb-16 3:56
mveRichard Deeming20-Feb-16 3:56 
AnswerRe: MCV How To? Controller Action that doesn't do anything Pin
2374121-Feb-16 5:29
2374121-Feb-16 5:29 
GeneralRe: MCV How To? Controller Action that doesn't do anything Pin
Foothill21-Feb-16 5:38
professionalFoothill21-Feb-16 5:38 
GeneralRe: MCV How To? Controller Action that doesn't do anything Pin
2374121-Feb-16 5:50
2374121-Feb-16 5:50 

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.