TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sunny Dhiman
NA
81
6k
Call Method using Ajax.
Mar 24 2021 8:34 AM
I have make a method in under controller and i call with ajax
$(function () {
$("#btnSend").click(function () {
debugger;
//var inputName = $.trim($("#inputName").val());
var toEmail = $.trim($("#inputEmailAdress").val());
var subject = $.trim($("#inputSubject").val());
//var address = $.trim($("#inputAddress2").val());
var body = $.trim($("#comment").val());
$.ajax({
type: "POST",
url: "/Home/SendEmailAsync",
public async Task SendEmailAsync(string toEmail, string subject, string content)
{
var apiKey = "";
var client = new SendGridClient(apiKey);
var from = new EmailAddress("");
var to = new EmailAddress(toEmail);
var msg = MailHelper.CreateSingleEmail(from, to, subject, content, content);
var response = await client.SendEmailAsync(msg);
}
But i have face a issue 404
Reply
Answers (
4
)
Find selected row html table values in mvc
Create a Sage300 accpac session