locked
JavaScript with MVC RRS feed

  • Question

  • Hi.. I am new in ASP.NET MVC. I want to know how can i use JavaScript functions in MVC view??

    thanks,

    • Moved by Caillen Monday, January 13, 2014 9:43 AM
    Sunday, January 12, 2014 9:15 AM

Answers

  • Hi Ahmed.Y,

    Please post your question in ASP.NET forums where you could receive more responses.

    Thanks for your understanding.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Monday, January 13, 2014 3:10 PM
    • Marked as answer by Just Karl Sunday, January 26, 2014 2:09 AM
    Monday, January 13, 2014 9:42 AM

All replies

  • Hi Ahmed.Y,

    Please post your question in ASP.NET forums where you could receive more responses.

    Thanks for your understanding.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Monday, January 13, 2014 3:10 PM
    • Marked as answer by Just Karl Sunday, January 26, 2014 2:09 AM
    Monday, January 13, 2014 9:42 AM
  • using System.Net; using System.Net.Mail;

    public void email_send()
    {
       
    MailMessage mail = new MailMessage();
       
    SmtpClient SmtpServer = new SmtpClient("server name here e.g gmail.com");
        mail
    .From = new MailAddress("the e mail adrress to whom e mail is from");
        mail
    .To.Add("the emil adress to whom you wana send an email");
        mail
    .Subject = "Subject of the mail";
        mail
    .Body = "contenct of the e mail";

      you can also add and attachment as follows

       
    System.Net.Mail.Attachment attachment;
        attachment
    = new System.Net.Mail.Attachment("c:/textfile.txt");
        mail
    .Attachments.Add(attachment);

       
    SmtpServer.Port = 587;
       
    SmtpServer.Credentials = new System.Net.NetworkCredential("your mail@gmail.com", "your password");
       
    SmtpServer.EnableSsl = true;

       
    SmtpServer.Send(mail);

    Friday, March 7, 2014 11:08 AM
  • http://stackoverflow.com/questions/26736163/calling-javascript-function-in-mvc-5-razor-view

    Vignesh M

    Wednesday, August 31, 2016 8:44 PM