hello friends.
i want to fetch record by using "session".
i want to get record of particular logged user.
i am using this. bit it not working.
==========================
public class UserController : Controller { private Entities db = new Entities(); public ActionResult Index() { int userId = (int)Session["LoggedUserID"]; var user = db.Users.SingleOrDefault(u=>u.UserId==userId); if (user != null) return View(user); // this return View(); } }please help me.
RinkiPosted Oct 2, 2017, 3:06 AM
Manas MohapatraPosted Oct 2, 2017, 1:57 AM