Link to home
Create AccountLog in
Avatar of finance_teacher
finance_teacher

asked on

same create, edit, details page layout -- asp.net mvc4

I spent a long time setting up 200+ of the below on
"CREATE.cshtml" in attached "4 column" format/etc.

How can I easily use the same thing on
my "DETAILS.cshtml" and "EDIT.cshtml" pages ?
  ** Maybe a COPY/PASTE, change some things, etc ?
--------------------------------------------------------------
        <tr>
            <td>
                Last Modified Date
            </td>
            <td>
                @Html.SecurityEditor(
                Html.EditorFor(model => model.LastModifiedDate),
                new object[] {"role1", "role2", "role3"})
                @Html.ValidationMessageFor(model => model.LastModifiedDate)
            </td>

            <td>
                Pricing Type
            </td>
            <td>
                @Html.SecurityEditor(
                Html.EditorFor(model => model.PricingType),
                new object[] {"role1", "role2", "role3"})
                @Html.ValidationMessageFor(model => model.PricingType)
            </td>
        </tr>
s006.jpg
ASKER CERTIFIED SOLUTION
Avatar of AnuTiji
AnuTiji
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of finance_teacher
finance_teacher

ASKER

Can I also do the same for the DETAILS.cshtml (readOnly) page ?
Yes you can do the same for view page, but you will have to set the controls to read only by using javascript