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
Guest User
Tech Writer
18
2.9k
Send Data By Ajax.
Mar 25 2021 6:04 AM
I have send data by ajax but i have face null value in controller
Ajax Code
$(function () {
$("#btnSend").click(function () {
//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());
debugger;
var employee = {};
employee.toEmail = $('#inputEmailAdress').val();
employee.inputName = $('#inputName').val();
employee.subject = $('#inputSubject').val();
employee.body = $('#comment').val();
$.ajax({
type: "POST",
url: '/Genric/SendEmail',
//data: "{ toEmail: '" + toEmail + "', subject: '" + subject + "', body: '" + body + "', inputName:'" + inputName + "'}",
data: '{emp: ' + JSON.stringify(employee) + '}',
This C# code
public string SendEmail(string toEmail, string subject, string content)--here toEmail null
{
var apiKey = "";
var client = new SendGridClient(apiKey);
Reply
Answers (
1
)
RowNumber(Nothing) in SSRS with #11
Send Email By Send Grid,