Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Reply
Exception occurs when deserialize json data
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Gurmeet Singh
7y
240
1
Reply
Object reference not set to an instance of an object when deserialize json data
public ActionResult GetBill(string[] jdata)
{
List
datax1 = JsonConvert.DeserializeObject
>(jdata.ToString());
return view("GetBill");
}
$scope.genbil = function () {
//alert(angular.toJson($scope.itemslst));
//var jdata = ["role1", "role2", "role3"];
var jdata =[angular.toJson($scope.itemslst)];
alert(jdata);
jQuery.ajax({
type: "POST",
url: "/CustomerItem/GetBill",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: JSON.stringify(jdata),
success: function (data) { alert(data); },
failure: function (errMsg) {
alert(errMsg);
}
});
}
Please anyone can help me.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Which is best Between Entity Framework And Stored Procedure
Group by in datatable in C# and Merge Grouped Records in one