c# - DataAnnotation Presentation Working on IIS Express but Not Working on IIS -


i'm developing asp.net mvc application, , controlling presentation of element properties using data annotations. result fine on iis express directly visual studio, when deploy uat server annotations fail.

code:

edit.cshtml:

@html.editorfor(m => m.globalizedelement) 

model:

public class globalizedelement {     [hiddeninput(displayvalue = false)]     public int id { get; set; }      [hiddeninput(displayvalue = false)]     public int elementid { get; set; }      [hiddeninput(displayvalue = false)]     public string culturecode { get; set; }      [datatype(datatype.multilinetext)]     [allowhtml]     [display(name = "internaldescription", resourcetype = typeof(entitydataannotations))]     [required(errormessageresourcetype = typeof(entityvalidation), errormessageresourcename = "requiredinternaldescription")]     public string internaldescription { get; set; }      [datatype(datatype.multilinetext)]     [allowhtml]     [display(name = "interviewdescription", resourcetype = typeof(entitydataannotations))]     public string interviewdescription { get; set; }      [datatype(datatype.multilinetext)]     [allowhtml]     [display(name = "externaldescription", resourcetype = typeof(entitydataannotations))]     public string externaldescription { get; set; } } 

the iis express presentation hides hidden fields, , uses multiline text boxes.

the deployed iis presentation shows fields, , single line text boxes.

i using vs2013 on windows 7 ultimate, , deploying windows server 2008 r2 server.

thanks in advance assistance.

ricardo - no there no script elements on form. problem seems in rendering engine. page source iis express server is:

     <div class="editor-field">                     <textarea class="text-box&#32;multi-line" data-val="true" data-val-required="please&#32;enter&#32;a&#32;internal&#32;description" id="globalizedelement_internaldescription" name="globalizedelement.internaldescription">                     </textarea> <span class="field-validation-valid" data-valmsg-for="globalizedelement.internaldescription" data-valmsg-replace="true"></span></div>                 <div class="editor-label">                     <label for="globalizedelement_interviewdescription">interview description</label>                 </div>                 <div class="editor-field">                     <textarea class="text-box&#32;multi-line" id="globalizedelement_interviewdescription" name="globalizedelement.interviewdescription">                     </textarea> <span class="field-validation-valid" data-valmsg-for="globalizedelement.interviewdescription" data-valmsg-replace="true"></span></div>                 <div class="editor-label">                     <label for="globalizedelement_externaldescription">external description</label>                 </div>  iis is:   <div class="editor-label">                     <label for="globalizedelement_id">id</label>                 </div>                 <div class="editor-field">                     <input class="text-box&#32;single-line" data-val="true" data-val-number="the&#32;field&#32;id&#32;must&#32;be&#32;a&#32;number." data-val-required="the&#32;id&#32;field&#32;is&#32;required." id="globalizedelement_id" name="globalizedelement.id" type="number" value="0" /> <span class="field-validation-valid" data-valmsg-for="globalizedelement.id" data-valmsg-replace="true"></span></div>                 <div class="editor-label">                     <label for="globalizedelement_elementid">elementid</label>                 </div>                 <div class="editor-field">                     <input class="text-box&#32;single-line" data-val="true" data-val-number="the&#32;field&#32;elementid&#32;must&#32;be&#32;a&#32;number." data-val-required="the&#32;elementid&#32;field&#32;is&#32;required." id="globalizedelement_elementid" name="globalizedelement.elementid" type="number" value="0" /> <span class="field-validation-valid" data-valmsg-for="globalizedelement.elementid" data-valmsg-replace="true"></span></div>                 <div class="editor-label">                     <label for="globalizedelement_culturecode">culturecode</label>                 </div>                 <div class="editor-field">                     <input class="text-box&#32;single-line" id="globalizedelement_culturecode" name="globalizedelement.culturecode" type="text" value="" /> <span class="field-validation-valid" data-valmsg-for="globalizedelement.culturecode" data-valmsg-replace="true"></span></div>                 <div class="editor-label">                     <label for="globalizedelement_internaldescription">internaldescription</label>                 </div>                 <div class="editor-field">                     <input class="text-box&#32;single-line" id="globalizedelement_internaldescription" name="globalizedelement.internaldescription" type="text" value="" /> <span class="field-validation-valid" data-valmsg-for="globalizedelement.internaldescription" data-valmsg-replace="true"></span></div>                 <div class="editor-label">                     <label for="globalizedelement_interviewdescription">interviewdescription</label>                 </div>                 <div class="editor-field">                     <input class="text-box&#32;single-line" id="globalizedelement_interviewdescription" name="globalizedelement.interviewdescription" type="text" value="" /> <span class="field-validation-valid" data-valmsg-for="globalizedelement.interviewdescription" data-valmsg-replace="true"></span></div>                 <div class="editor-label">                     <label for="globalizedelement_externaldescription">externaldescription</label>                 </div>                 <div class="editor-field">                     <input class="text-box&#32;single-line" id="globalizedelement_externaldescription" name="globalizedelement.externaldescription" type="text" value="" /> <span class="field-validation-valid" data-valmsg-for="globalizedelement.externaldescription" data-valmsg-replace="true"></span></div> 


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -