display-templates Questions
2
I want to pass an object Model.AvailableVerticalType along with the
expression and templateName in the call to the HTML Helper DisplayFor.
Without passing the object, the DisplayFor() syntax looks ...
Plerre asked 10/6, 2016 at 7:11
5
Solved
How do i create a display template so i can display a bool as Yes or No not a checkbox? Using mvc3
<%: Html.DisplayFor(model => model.SomeBoolean)%>
Desperate asked 29/7, 2011 at 8:43
1
Solved
Trying to get DisplayTemplates in ASP.Net Core 2.2 to work with classes that inherit from a base class similar to this question How to handle an entity model with inheritance in a view?
The Princi...
Megilp asked 3/10, 2019 at 18:29
5
I worked Application Display Templates on liferay 6.2, I use freemarker help pagination the dynamics data list of liferay. When I upgrade to liferay 7, it is a problem. Liferay 7 use code <#assi...
Rhpositive asked 20/5, 2016 at 8:34
0
I used to use DisplayTemplates in MVC5 to get rid off foreach loops from views
If I have a ProductDto and ProductController
I would place a ProductDto.cshtml under
Views/Product/DisplayTempla...
Hahnemann asked 29/5, 2018 at 11:13
1
Solved
The overarching requirement I am trying to implement is to show comments (made on a list, item by item basis).
I added the feature on the authoring side by enabling versioning on the list and addi...
Output asked 12/8, 2016 at 13:53
4
Solved
I'm trying to make a custom template for a basket item list. I need a few different templates, as I have different ways of displaying the item, depending on if it's on the webpage or in a mail. Now...
Boundless asked 29/4, 2011 at 15:24
4
Solved
I have the following model in MVC:
public class ParentModel
{
public string Property1 { get; set; }
public string Property2 { get; set; }
public IEnumerable<ChildModel> Children { get; s...
Coben asked 3/11, 2011 at 21:23
2
When I use nested display templates and add input elements through the HTML helper the Razor engine adds a prefix to the fields names.
I do understand this is done to guarantee input name uniquene...
Scrubland asked 3/9, 2013 at 15:2
1
I have an editor template and within that editor template i want to call another editor template with the same model (i.e. nested), but it does not seem to display.
ie. \EditorTemplates\Template1.c...
Nunez asked 25/7, 2011 at 4:12
1
Solved
Hi i'm building application in MVC and i want to use a display template to display my model in a view. This is my template, but it gives me error when I try to display it:
@*<tr>
<td>@...
Gardol asked 3/12, 2013 at 17:28
3
Solved
If i have a ViewModel like this:
public class MyViewModel
{
[UIHint("SomeTemplate")]
public ICollection<SomeViewModel> Submodel { get; set; }
}
And a strongly-typed View with a line of H...
Welcome asked 23/5, 2011 at 6:47
1
Solved
I have a Content Search Webpart that uses a customized Display Template to display results of recent changed documents.
I would like to show the "last modified-date" below the document Title.
I ca...
Irruption asked 22/5, 2013 at 11:45
1
I am using a Display Template in my C# MVC4 application to structure how I want my custom model to be displayed in a datatable within my view. For the datatable, Im using datatables.net. In the fol...
Agna asked 13/4, 2013 at 14:45
4
I've just started a project using ASP.NET MVC 3. I'm building on top of an existing object system, so one of the first things I have to do is define display and editor templates for the various typ...
Ng asked 13/3, 2011 at 0:56
2
Solved
I'm getting this error:
Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
Here's my code (custom HTML...
Monkfish asked 17/8, 2012 at 1:5
1
Solved
I want to create a display template for string properties only, and use default for all others.
I tried to make a string.cshtml in Views/Shared/DisplayTemplates with following contents:
@model st...
Idio asked 13/6, 2012 at 8:59
2
Solved
I have created a DisplayTemplate for a Comment class, and placed it inside Comment/DisplayTemplates/Comment.cshtml.
Comment.cshtml is properly typed:
@model Comment
Then, I have a partial view ...
Universally asked 13/4, 2011 at 15:24
1
Solved
I have an IEnumerable of a base type as my model.
I need to display a different bit of HTML in a list depending on what the concrete type is.
So the resulting list might look similar to this in H...
Gigolo asked 27/6, 2011 at 15:34
3
Solved
I am reading up on ASP.NET MVC and all of it's fun uses and I just found out about DataTemplates.
In my hurry to test this thing out, I converted one of my simpler models over to using @Html.Displ...
Moujik asked 7/4, 2011 at 15:19
1
Solved
I recently hit an issue with ASP.NET MVC display templates. Say this is my model:
public class Model
{
public int ID { get; set; }
public string Name { get; set; }
}
this is the controller:
p...
Backbone asked 18/2, 2011 at 7:53
1
© 2022 - 2024 — McMap. All rights reserved.