asp.net mvc - How to store my data using at the end of my step in MVC? -
i have form using table of request
using idrequest (int)
, titleofrequest
, other table events can have multiple events same request.
so table of events include :
ideventst, idrequest, idtypeofevent, dateststrong textart, dateend table of typeofevent : idtypeofevent,titleoftype
from view create new record, record create @ final step, want make in order
1 ) enter form fields
titleofrequest
, fields person can enter :datestart
,dateend
,typeofevent
, button add, , load temporary records in datatable.
my questions : best way store temporary data mvc ? , refresh in view @ least save in database.
you use [tempdata] if want store data next request only.tempdata allow persisting data duration of single subsequent request.
if data should accessible between multiple requests, use session. [session] able store data more long time, until user session not expire.
here blogpost on matter:
http://petermcintyre.com/2013/01/27/asp-net-mvc-data-persistence-choices/
Comments
Post a Comment