mvc-editor-templates Questions
2
Solved
I've created a template for Number input and if I do
@Html.EditorFor(model => model.SomeValue, "Number")
it works fine and the template is used.
However that doesn't work:
@Html.EditorFor(m...
Skyrocket asked 1/2, 2013 at 22:14
1
Solved
This is a very specific issue. I managed to automatically add the placeholder attribute to html5 email input type by using an editor template called EmailAddress.cshtml, saved in ~/Views/Shared/Edi...
Mir asked 28/1, 2013 at 20:0
2
Usually I render my forms by @Html.RenderModel, but this time I have a complex rendering logic and I render it manually. I decided to create a editor template for one property. Here is the code (co...
Emilioemily asked 30/8, 2012 at 7:48
3
Solved
I'm trying to create an Editor Template for a DateTime field and it does not seem to respect my DisplayFormat attribute.
My model:
public class Project
{
[Display(Name="Project Name")]
[Require...
Clinch asked 19/8, 2011 at 15:4
1
Solved
this is a follow up question from MVC3 Razor httppost return complex objects child collections.
The example I gave was very simple. The child collection is actually a collection of objects that al...
Carruthers asked 11/5, 2012 at 16:45
7
Solved
How can I make a default editor template for enums? By which I mean: can I do something like this:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Enum>" %>
<% -...
Skylab asked 7/8, 2010 at 18:18
1
Solved
I would like to return an EditorTemplate from my controller as a Partial View.
I am currently doing:
public ActionResult Create([Bind(Prefix="Create")]CreateViewModel model)
{
return PartialView...
Portauprince asked 6/12, 2011 at 16:18
2
Solved
I've got an editor template location in:
Areas/Posts/Views/Shared/EditorTemplates/Question.cshtml
I also have one in:
/Views/Shared/EditorTemplates/Question.cshtml
For both, the model is ...
African asked 17/11, 2011 at 6:28
3
Solved
I have a model property I'm trying to render using an EditorFor template, and I'm trying to apply formatting using the DisplayFormat attribute. However, it's not working at all -- it's totally bein...
Homoio asked 20/10, 2011 at 22:39
3
I use helper @Html.EditorForModel() on all my views.
There is a desire that he skip two fields in my model, but only on this view, the other he must continue to display these fields as usual.
How...
Conciliar asked 28/7, 2011 at 14:18
2
Solved
I have a View in which the user can choose any number of Clubs by selecting checkboxex. The Clubs are a property of the main model with type List<ClubModel>.
While refactoring I start out with t...
Dodecanese asked 21/8, 2011 at 0:39
2
In my EditorTemplates, i Have two Views. One for my Category (called _Category)
@model com.example.Models._Category
@Html.CheckBox(Model.Name, Model.Selected)
@Html.LabelFor(c => c.Name, Model...
Whittaker asked 18/8, 2011 at 21:54
1
Solved
Lets say I have a LineItem (from the over used Shopping Cart example) and I want to render it using a EditorTemplate.
I am perfectly alright rendering it using a @Html.EditorFor(m => m.LineItems) ...
Gottschalk asked 11/8, 2011 at 20:32
1
Solved
How can I change the index of HtmlFieldPrefix?
I'm getting Children[0] from EditorFor() and I want to make it Children[@Model.Id]
or Children[2].Children[4] from EditorFor() and I want to make it ...
Coherence asked 10/8, 2011 at 23:46
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. ...
Fezzan asked 16/4, 2011 at 1:5
3
Solved
How do I properly register javascript blocks in an ASP.NET MVC 2 (RTM) Editor template?
The specific scenario I'm in is that I want to use Dynarch JSCal2 DateTimePicker for my standard datetime pi...
Gland asked 27/3, 2010 at 19:26
3
Solved
Just wondering how and when people are using Editor/Display Templates vs. Html Helpers. Specifically I am talking about its use in rendering different UI control rather than rendering entities.
Fo...
Mustache asked 4/2, 2010 at 22:26
© 2022 - 2024 — McMap. All rights reserved.