editorfor Questions

2

Solved

Is there any way to access any attributes (be it data annotation attributes, validation attributes or custom attributes) on ViewModel properties from the view? One of the things I would like to add...
Hallowmas asked 21/9, 2011 at 23:52

2

I have an EditorFor: <%: Html.EditorFor(model => model.Client, "ClientTemplate", new { editing = false })%> This will bind coming down to the view fine (as expected) but will not bind b...
Shufu asked 5/1, 2011 at 16:43

3

Solved

Is the Razor engine really needed to create an MVC3 site with EditorFor syntax? Almost all the examples I've seen are using Razor. Were working on our first MVC project, and would rather not be on ...
Cherri asked 23/6, 2011 at 16:3

1

Solved

I've got a pretty simple problem that has a solution I'm not able to find. Given the following model: public class InfoViewModel { public SelectList States { get; set; } [DisplayName("State")]...

2

Solved

In my model i've the MyDate property that has datetime type. I sign the property with the DisplayFormat attribute in this mode: [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:...

1

Solved

My ViewModel has a property that is a collection of another of my model entities, in this case CategoryTags (and each tag has a Tag and an ID). 1) Am I correct in understanding that Html.EditorFor...
Mcgaha asked 22/4, 2011 at 15:22

1

Solved

I've written an EnumDropDownFor() helper which I want to use in conjunction with EditorFor(). I've only just started using EditorFor() so am a little bit confused about how the template is chosen. ...

2

I have a View where the model has a collection of items. Then I have an EditorFor template that takes care of creating a dropdownlist for the user to select one of a limited number of values for ea...

1

Solved

When calling Html.EditorFor(m => m), where m is a public class with public properties, a hidden input and a label are displayed for properties with the [HiddenInput] attribute. How can I hide ...
Triboluminescence asked 8/5, 2010 at 9:36

1

Solved

You can provide alternate templates for individual types, but is it possible to override the template that wraps the label, field and validation up. Change: <div class="editor-label"><la...
Rhadamanthus asked 27/10, 2009 at 10:56

© 2022 - 2024 — McMap. All rights reserved.