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
Marius Vasile
594
1.9k
144.8k
asp.net core razor json null data trigger error
Mar 17 2021 4:34 PM
I have a json whic gets data from 4 tables. one of it has no value and because of that I have nothing in my view
public
async Task<JsonResult> OnGetDetailsAsync(
string
id1,
int
id2)
{
var woplanner = await _context.WOPlanners.FirstAsync(s => s.WOMainID == id1 && s.WONumberS == id2);
var woapprover = await _context.WOApprovers.FirstAsync(s => s.WOMainID == id1 && s.WONumberS == id2);
var woplannerS = await _context.WOPlannerSCHs.FirstAsync(s => s.WOMainID == id1 && s.WONumberS == id2);
var woreports = await _context.WOReports.FirstAsync(s => s.WOMainID == id1 && s.WONumberS == id2);
WOD obj =
new
WOD
{
WOPlanner = woplanner,
WOApprover = woapprover,
WOPlannerSCH = woplannerS,
WOReport = woreports
};
return
new
JsonResult(obj);
}
WOPlannerSCH has no data now, how do I fix this?
Reply
Answers (
2
)
How to disable buttons in webgrid after saving data with jquery
asp.net core date from json is displayed incorrectly in jquery