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
Gaurav Raj
NA
475
88.5k
why are return json page instead of view
Sep 18 2018 9:57 AM
if (Session["UserID"]!=null)
{
if (user==id)
{
//var q = (from a in db.RegisterTables
// where a.Id == user
// select a).SingleOrDefault();
//if (q!=null)
//{
// ViewData["name"] = q.F_Name + ' ' + q.L_Name;
// ViewData["UserPic"] = q.Pic;
//}
//return Json(q, JsonRequestBehavior.AllowGet);
db.Configuration.ProxyCreationEnabled = false;
RegisterTable ma = db.RegisterTables.First(x => x.Id == id);
return Json(ma, JsonRequestBehavior.AllowGet);
}
else
{
//var q = (from a in db.RegisterTables
// where a.Id == id
// select a).SingleOrDefault();
//if (q != null)
//{
// ViewData["name"] = q.F_Name + ' ' + q.L_Name;
// ViewData["UserPic"] = q.Pic;
//}
//return Json(q, JsonRequestBehavior.AllowGet);
// db.Configuration.ProxyCreationEnabled = true;
RegisterTable ma = db.RegisterTables.First(x => x.Id == id);
return Json(ma, JsonRequestBehavior.DenyGet);
}
}
else
{
return RedirectToAction("Login", "Account");
}
Reply
Answers (
2
)
Mvc5 Video Conferencing Plugin
finding x and y coordinates of an ellipse that is drawn.