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
Anilananda Chakrabortty
NA
425
78.4k
Json Response not getting while using POST method for Insert
Dec 14 2018 7:02 AM
I have created a simple webapplication where i am inserting the data through WCF service using AJAX
Data is inserted but it is not not going to the ajax success function where i will get the response of the method . im not able to solve
here is my code.............
$.ajax({
url: "http://localhost:62215/Services/MyService.svc/rest/CreateApplications",
type: "POST",
data: JSON.stringify(objApp),
async: false,
dataType: "json",
contentType: "application/json;charset=UTF-8",
success: function (response) {
debugger;
console.info(response);
alert('Inserted, i am from success function');
},
failure: function (msg) {
console.info(msg);
}
});
using Newtonsoft.Json;
public string CreateApplications(Application app)
{
BusinessLogic.addApplication(app);
var chk = new check
{
subject = "hello! " + "Anil",
description = "Anil" + " Years Old"
};
return JsonConvert.SerializeObject(chk);
}
public class check
{
public string subject { get; set; }
public string description { get; set; }
}
Data is inserted their is no issu ..... but i want return json string
Reply
Answers (
2
)
Application Insights User flows
session creation and timeout