Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Sending Json data to Model in MVC
raj kadam
Oct 29 2015 8:27 AM
397
Reply
this is my json code for sending value but it not getting at controller end..
$("#submitt").click(function ()
{
var name = $("#txtName").val();
var city = $("#txtCity").val();
var data = { 'name': name, 'city': city };
var obj = JSON.stringify(data);
$.ajax(
{
url: '/Mate/Create',
type: 'POST',
dataType: 'json',
data: {},
contentType: 'application/json; charset=utf-8',
success: function (obj)
{
alert(obj.d);
$("#content").html("Sending..");
}
})
});
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Reading Xml Node with Namespace
is mvc part of .net framework?