mvc-editor-templates Questions
4
Solved
This might be easy but I've searched SO and tried some suggestions for this none of which work. I'm using an MVC Editor Template that has a div with a standard html button and other fields. When I ...
Rob asked 25/7, 2012 at 1:6
1
Solved
with MVC 4 I was able to put a view's editor templates into the view's folder: AwesomeApp/Views/UserMgmt/EditorTemplates/UserSettings.cshtml.
Now I am using ASP.NET Core MVC 6 and it does not find...
Dimphia asked 28/7, 2016 at 14:28
3
Solved
I have this code to set the default value of my select list:
public ActionResult Register()
{
IList<Country> countryList = _countryRepository.GetAllCountry();
var registerViewModel = new ...
Geraldo asked 20/12, 2010 at 3:7
6
Solved
I have a property on one of my objects that is a nullable boolean, I want my logic to have true represent Yes, false to be No and null to be N/A. Now because I am going to have multiple properties ...
Ranita asked 19/7, 2011 at 18:13
5
Solved
I have two editor templates: one for decimal, and one for decimal? (nullable)
But when I have a nullable decimal in my model, it tries to load the normal decimal editor:
<%: Html.EditorFor(mod...
Macymad asked 24/7, 2010 at 3:54
3
Solved
I have a model:
public class MyListModel
{
public int ID {get;set;}
public List<User> Users{get;set;}
}
How do I use the Html.EditorFor method inside a foreach?
@model MyListModel
<t...
Orme asked 31/12, 2009 at 5:2
1
Solved
I am working with a bootstrap template and its checkbox template is like this:
<div class="checkbox">
<label>
<input type="checkbox" class="checkbox style-1" checked="checked">...
Adenoid asked 22/2, 2016 at 9:33
3
Solved
I thought Html.HiddenFor could use Templates like Html.DisplayFor or Html.EditorFor. Unfortunately the method doesn't accept a TemplateName like the others.
I know, the workaround would be to use ...
Hoshi asked 9/7, 2013 at 10:25
4
Solved
I need to change date format to be dd.MM.yyyy. I am getting client side validation error because ASP.NET MVC date format is different from what I expect on the server.
In order to change ASP.NET M...
Stedt asked 14/6, 2013 at 10:10
2
Solved
I am building an Editor Template, which will accept htmlAttributes object.
Example is simple.
In main view I have something like
@Html.EditorFor(Function(x) x.SomeProperty, New With {.htmlAtt...
Cattleman asked 8/10, 2015 at 12:29
3
When I set ViewBag.Title at the top of a Razor template, the Model.Title editor template text box is populated using the value of ViewBag.Title instead of the expected Model.Title value. Calling Ht...
Julide asked 4/1, 2013 at 9:40
4
Solved
I'm using ASP.NET MVC3 with Razor and C#. I am making a form builder of sorts, so I have a model that has a collection of the following object:
public class MyFormField
{
public string Name { get...
Lax asked 25/8, 2011 at 19:6
3
Solved
In MVC you can create an editor template for T and then when you want to render an editor for a property of type IEnumerable<T> you can simply do e.g.
Html.EditorFor(m => m.MyListOfT)
T...
Sarah asked 9/10, 2012 at 10:56
1
EditorTemplates are great since they allow some kind of "polymorphism" in razor views. But I am missing one "brick" to complete the polymorphism support:
Can an EditorTemplate for a special type i...
Edentate asked 31/10, 2014 at 10:38
5
I have a Model with a property
[ReadOnly(true)]
public decimal BodyMassIndex { get; private set; }
In my View when I call
@Html.EditorForModel()
I still get a standard editable textbox for ...
Badger asked 19/9, 2011 at 19:44
3
I have been using MVC Editor & Display Templates for a while, but have come to realize that there seems to be very little official documentation on MVC Editor/Display Templates (Html.EditorFor(...
Bailable asked 28/9, 2012 at 17:26
3
I am new to ASP.NET MVC, so apologies if this is easier than it looks. I've been Googling around, I have a class like so:
public class Search : IAuditable
{
[Key]
public int SearchID { get; set;...
Edmonson asked 2/5, 2013 at 0:41
1
I've overridden the default editor template (Object.ascx) to produce form (body) HTML that follows to Twitter Bootstrap's guidelines (http://twitter.github.io/bootstrap/base-css.html#forms) which i...
Subway asked 19/6, 2013 at 14:24
3
Solved
I have a Kendo grid set up like so:
@(Html.Kendo().Grid<ParticipatingDentalEE>()
.Name("DentalEE")
.Columns(columns =>
{
columns.Bound(p => p.State).Title("State").Width(150).EditorTe...
Readable asked 15/8, 2013 at 20:49
3
Solved
I have a standard set of templates for my mvc projects which I want to keep as an external folder in my source control (SVN)
This means that I cannot put any project specific files in this folder ...
Folkestone asked 7/4, 2011 at 13:22
1
Solved
I am unhappy with the current DropDownList implementation, because I can't really do much with the option tags (only selected, text and value is supported). I want to make my own where I can set di...
Thunderbolt asked 10/8, 2013 at 11:2
2
I have tried to find documentation or samples on how to incorporate razor editor templates into a project. the following answer on another thread may fix a problem I am having but I do not know how...
Bilicki asked 8/2, 2013 at 10:8
2
Solved
I found this post about Display and EditorTemplates for MVC:
http://www.growingwiththeweb.com/2012/12/aspnet-mvc-display-and-editor-templates.html
It creates a display template to easily display ...
Xenophobe asked 3/6, 2013 at 6:20
1
Solved
I am trying to use an EditorTemplate to display a child collection in a table in the parent’s view. The problem I have run into is that this only seems to work if the template is named exactly the ...
Chrysoberyl asked 18/5, 2013 at 22:54
2
Solved
To render HTML in my edit view, I use the helper @Html.EditorForModel().
My model:
[Required(ErrorMessage = "Campo obrigatório")]
[Display(Name = "Nome completo")]
public string Name { get; set; ...
Anamariaanamnesis asked 22/9, 2011 at 20:38
1 Next >
© 2022 - 2024 — McMap. All rights reserved.