Saturday, 15 February 2014

asp.net mvc - MVC - Html.BeginForm. My action method does not recieve argument -


I am trying to save data in my model. Here's my action method to do this:

  ... [HTTP post] Public Action Result UpdateSite Notice (Section Information Details Permission) {ViewBug. EditQuality: correctly = true; Section information = section information; // Save the database in settings (Var session = MvkStorage.GetSession ()) using {var client = new MvkSectionStorageHandler (session); Try {Client.SaveOrUpdateSection (s.Section); Client.SaveOrUpdateSectionReschedulingRelations (s.RescheduleFromRelations); Client.SaveOrUpdateSectionReschedulingRelations (s.RescheduleToRelations); } Hold (exception) {ViewBag.SectionUpdatedSuccesfully = false; }} See Return ("Index", S); }  

Here's HTML. Buffin form "Declaration" (Controller's name is section controller):

  @using (Html.BeginForm ("UpdateSectionInformation", "section", FormMethod.Post)) {  

It seems that the problem is that UpdateSectionInformation receives an empty model. How should I solve this? I'm new to MVC and do not really get me where UpdateSectionInformation is called. I have seen something about HTML. Hide, should I use it ?:

  @for (int i = 0; i  

Edit: Thank you for solving the problem


No comments:

Post a Comment