Questions tagged [viewengine]
262 questions
1
vote
1 answer
Using a custom RazorViewEngine AND RazorGenerator precompiled views
I am trying to use a custom (derived) RazorViewEngine AND precompiled views using RazorGenerator.
Some context:
We have a base product that we use for multiple client implementations. With that we have a core set of base views. Most of the views…

JDBennett
- 1,323
- 17
- 45
1
vote
2 answers
Where can I find some quality tutorials that take me through the anatomy of an MVC view?
My background is mostly in desktop applications on the Microsoft platform. I've been working a lot with ASP.Net MVC lately and completely skipped over learning webforms. I find I'm having the most trouble (not being a web guy) with writing my…

Lee Warner
- 2,543
- 4
- 30
- 45
1
vote
3 answers
ASP.NET MVC Use Controller or View outside of the MVC application context
Hello i am creating a small webpage that give our users an interface to search in our database.
This website must supply 2 webservice functions, Search(string searchString) and GetAccountInfoByInitials(string initials)
I would like to use my…

Androme
- 2,399
- 4
- 43
- 82
1
vote
0 answers
MVC 5 View Engines
I have recently started learning MVC5 (using Visual Studio 2015 Community), so I have a question about view engines.
Could someone pleased explain a bit about MVC5 view engines? I'm little bit confused, because if I, say, rename my Index.cshtml view…

Nenad Nikolic
- 11
- 4
1
vote
1 answer
How to pass and use model in Dotliquid ViewEngine
In my MVC web-application project I'm using Dotliquid.ViewEngine to automatically render my view as it said in the related blog post.I have a class inherited from "Drop" like this
public class FakeProduct : Drop
{
public string Name { set; get;…

Sara.Epoush
- 11
- 1
1
vote
0 answers
how can i add custom theme support in only an area?
i am very new to asp.net mvc and trying to build a small CMS with theme support.
while i was researching the subject on the net, i've found some examples but none of them helped me exactly.
here is my folder structure.
i have 2 Areas. it was working…

ysrtymz
- 61
- 12
1
vote
0 answers
C# string format json to json without having to replace input to double braces
I have a json template (example:
jsonTemplate = "{ \"title\" : \"{0}\", \"desc\" : \"{1}\" }"
And I need to format by an object or params. When using string format of .NET, it'll be:
string.Format(jsonTemplate, "My Title", "My Description");
And…

khangcv
- 81
- 2
- 8
1
vote
3 answers
erb <% expression -%> in aspx pages
Do asp.net aspx views have tags that that work similar to the Ruby erb <% -%> ?
I don't like all these line breaks in my asp.net mvc generated html.
As for the other view engines (nhaml, spark, razor) I don't want to use them yet.
Quick example of…

Valentin V
- 24,971
- 33
- 103
- 152
1
vote
1 answer
View engine that supports both ajax and direct calls
I'm looking for a way to serve a template in Node.js (Express) both "normally" rendered as HTML and rendered as JSON, if it was requested with ajax.
Let's say I have a template like this in swig:
{% extends 'layout.html' %}
{% block title %}Default…

Timo Mämecke
- 287
- 2
- 14
1
vote
1 answer
How nopcommerce plug-in is loaded view?
How is the nopcommerce plug-in loaded in the view?
The ThemeableRazorViewEngine view rewrite engine found no relevant information and Plugins.

Sean Shi
- 11
- 2
1
vote
0 answers
Exception on checking for existance of file at server in unit test using mocked httpcontext
I am getting an exception -
System.NullReferenceException: Object reference not set to an instance of an object.
Result StackTrace:
at System.Web.WebPages.FileExistenceCache.<.ctor>b__4(String path)
at…

MGR
- 313
- 3
- 14
1
vote
3 answers
Custom View Engine in ASP.NET MVC 2 does not work with Areas
I used the code below so far with ASP.NET MVC v1 and v2 but when I added an Area today to my application, the controller for the area couldn't find any views in my Areas/Views/controllerView folder. It issued the very well known exception that it…

mare
- 13,033
- 24
- 102
- 191
1
vote
1 answer
Node js hbs module and engine
I'm new to node js and came across this hbs module and saw it in this part code for example :
app.set('view engine', 'html');
app.engine('html', require('hbs').__express);
can anyone please explain what is hbs (handlebars - but what does it…

asasdasd
- 33
- 1
- 6
1
vote
3 answers
Literals that precede { in spark view engine
I was going through the spark view engine documentation and found a lot of literals showing up in code for which I couldn’t find any references. For e.g.
! , #, $ , !$ , ...
What are these for? What do the combinations mean? When do they come…

Quintin Par
- 15,862
- 27
- 93
- 146
1
vote
1 answer
Is it possible to use different view engines for different views in the *same* ASP.NET MVC website?
I'd like to experiment with NHaml. Can I use the NHaml view engine for a few of my views, without having to convert the entire application (or create a new prototype application)?

Ben Aston
- 53,718
- 65
- 205
- 331