views:

38

answers:

0

When I submit my form using Ajax.BeginFrom everything seems to work and update fine but the ID. The ID is calculated in the server and send back to the partial page but the page is not updating the hidden field ID. I know the ajax works because the messages generated in the server get displayed in the page so there's something I can't understand going on.

The only way I got it to work is by doing that:

<% if (Model.QuickLifestyleAssessmentForm.ID != null)
   { %>
<%= Html.Hidden("QuickLifestyleAssessmentForm.ID", Model.QuickLifestyleAssessmentForm.ID)%>
<% } %>

that seems to fix it however it's not really an elegant solution and I would like to do it properly.

regards and many thanks, jose