serialization - using Microsoft.Web.MVC on View -
i following online example creating wizard control. involves in serializing model on view, pass controller deserialize model , use. below code view,
@using microsoft.web.mvc @model sample.models.registerwizardviewmodel @{ var currentstep = model.steps[model.currentstepindex]; viewbag.title = "register"; } @using (html.beginform()) { @html.serialize("wizard", model) @html.hidden("steptype", model.steps[model.currentstepindex].gettype()) @html.editorfor(x => currentstep, null, "") if (model.currentstepindex > 0) { <input type="submit" value="previous" name="prev" /> } if (model.currentstepindex < model.steps.count - 1) { <input type="submit" value="next" name="next" /> } else { <input type="submit" value="finish" name="finish" /> } }
now @ first not finding [deserialize] attribute in controller , have installed mvccontrib package nuget.
the problem facing @html.serialize("wizard", model) not found. namespace microsoft.web.mvc not resolved. if in controller file use microsoft.web.mvc work without problem when use same namespace in view not resolved. difference between system.web.mvc , microsoft.web.mvc? how resolved namespace error?
i have read @html.serialize not available , can accessible through mvc futures. have added package how use serialize model on view?
edit: mention have installed nuget package microsoft.aspnet.mvc.futures 5.0.0' unable see reference in references folder. there no microsoft.aspnet.mvc or microsoft.aspnet.mvc.futures reference in references folder. did go wonder?
Comments
Post a Comment