Create one (or more) partial views for your entity (example using the contact entity)
- IdChange.ascx (which shows Id and change information)
- PersonalInfo.ascx
- Address.ascx
IdChange.ascx will only be needed in edit views
Create two seperate views for edit and create and then use RenderPartial to bring your model data to the view.
Create.aspx
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>
<% using (Html.BeginForm())
{ %>
<fieldset>
<legend>Create a new contact</legend>
<div id="pagecontent">
<div id="left">
</div>
<div id="center">
<% Html.RenderPartial("PersonalInfo", Model); %>
</div>
</div>
<p>
<input type="submit" value="Create" />
Edit.aspx
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
<% using (Html.BeginForm())
{ %>
<fieldset>
<legend>Create a new contact</legend>
<div id="pagecontent">
<div id="left">
<% Html.RenderPartial("IdChange", Model); %>
</div>
<div id="center">
<% Html.RenderPartial("PersonalInfo", Model); %>
</div>
</div>
<p>
<input type="submit" value="Edit" />