Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EF attributes that can only be changed from code
Message
 
 
To
04/04/2013 10:36:54
General information
Forum:
ASP.NET
Category:
MVC
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01569983
Message ID:
01570071
Views:
22
>How are they put in the View now?
>
>>
>>Could it be I am doing something wrong?
>>
>>Also, may be I can put the fields in the view as readonly textboxes - may be it will solve the problem?

Right now they are not in the view at all. This is my main view which is partial view called _ClientForm.cshtml
@using CardNumbers.Helper
@model CardNumbers.Models.ClientViewModel
  <form id="add-edit-form">
    <fieldset>
        <legend>Client Info</legend>

        @Html.ValidationSummary(true)
       
        <input type="hidden" id="fntype" name="fntype" value="Edit">

        @Html.HiddenFor(m => m.ClientId)
        @Html.EditorFor(m => m.ClientNumber, EditorTemplate.TextBox)

        @Html.EditorFor(m => m.ClientName, EditorTemplate.TextBox)

        @Html.EditorFor(m => m.Client.Address, EditorTemplate.EditBox)

        <div id="ContactsInfo">

            <div id="Contact1">

                @Html.EditorFor(m => m.Client.Contact1)

            </div>

            <div id="Contact2">

                @Html.EditorFor(m => m.Client.Contact2)
            </div>
        </div>

       @* <div id="SaveCancel" class="float-right">
            <button id="btnSave">Save</button>
            <button type="reset" id ="btnCancel" name="Reset">Cancel</button>
        </div>*@
    </fieldset>

 </form>
So, as you see, I don't display these 4 fields.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform