c# - Mvc-infinite-scroll package null session -
i trying implement pakage
after load data db, store this:
session["reservations"] = futurereservations.todictionary(x => custindex++, x => x);
then trying data need current page:
public dictionary<int, restaurants> getrecordsforpage(int pagenum) { dictionary<int, restaurants> reservations = (session["reservations"] dictionary<int, restaurants>); int = (pagenum * recordsperpage); int = + recordsperpage; return reservations .where(x => x.key > && x.key <= to) .todictionary(x => x.key, x => x.value); }
the problem reservations
variable stays null, if session info correct. can me figure out why?
Comments
Post a Comment