I would (as the question states) like to make an asynchronous call, preferably using ASP.net AJAX.
The code for the WebMethod looks like this:
[WebMethod]
public void SendMail(string name, string email, string subject, string body)
{
MailMessage toSend = new MailMessage(email, [email protected], subject, body);
var smtp = new SmtpClient();
smtp.Send(toSend);
}
The fields on the view are, not surprisingly: name, email, subject, body.
In my attempts to do this I haven't been able to get to the WebMethod. The service reference is in place, so at least I didn't screw that up.
Thanks for the help...