Questions tagged [viewengine]

262 questions
4
votes
1 answer

C# ASP.NET - how to use the default view engine standalone?

I would like to be able to use an ASP.NET view as an email template, complete with the <%= "hi there" %> syntax. Is there a way to invoke/setup this view engine in a standalone way?
user40097
  • 261
  • 1
  • 3
  • 6
4
votes
1 answer

node.js : rendering error with vash

I'm getting a rendering error in node.js with vash. I'm really struggling to see what the issue is. Below is the error and the code causing the error. TypeError: Problem while rendering template at line 4, character 2. Original message: object is…
nomongo
  • 3,435
  • 7
  • 30
  • 33
4
votes
2 answers

Unable to find view

With the following code: static string RenderViewToString(ControllerContext context,string viewPath,object model = null,bool partial = false) { // first find the ViewEngine for this view ViewEngineResult viewEngineResult = null; if…
Muhammad Usman
  • 1,366
  • 5
  • 18
  • 33
4
votes
1 answer

_ViewStart not used after Custom ViewEngine

Does anyone know if there is a reason why _ViewStart.cshtml wouldn't get picked up with a Custom ViewEngine in MVC 3? My Views now live at ~\UI\Views\ ~\UI\Views\Shared\ with ViewStart being at ~\UI\Views_ViewStart.cshtml. I've cleared out the…
Scott
  • 658
  • 6
  • 16
4
votes
4 answers

Nancy Razor Viewengine not found

I'm using Nancy 0.14.1.0 with a Razor view. Things are going fine as long as I work with the internal webserver in VS 2010. Now I did deploy the stuff to my webserver running IIS 6. The route is Get["/api/v1/admin/clients"] = parameters => { …
decades
  • 827
  • 17
  • 25
4
votes
1 answer

How to group partial shared views for specified controllers?

Is it possible to tell ViewEngine to look for partial shared views in additional folders for specified controllers (while NOT for others)? I'm using WebFormViewEngine. This is how my PartialViewLocations looks at the moment. public class…
Arnis Lapsa
  • 45,880
  • 29
  • 115
  • 195
4
votes
2 answers

displaymode for mobile with desktop view for ipad in asp.net mvc 4

Hi I have a MVC 3 application, recently converted to mvc 4 and added mobile views. I want to add displaymodes for Mobile with desktop view for tablets specially for iPad(traffic mainly from here). I have it like this in my…
user720719
  • 41
  • 2
  • 5
3
votes
0 answers

Angular Ivy In a Library Breaks enableResourceInlining

I have created a simple Angular library "test-pub" (using nx g @nrwl/angular:lib test-pub --publishable). Then I've added a very basic component to it. super.component.html:

super works!

super.component.ts: import { Component, OnInit } from…
Kirill Metrik
  • 384
  • 1
  • 2
  • 12
3
votes
1 answer

Custom ViewEngine ASP.NET MVC 3

I am looking for the simplest solution for the custom viewengine for asp.net mvc. So I can over-ride the path to look for the views. Actually, I am trying to build a theme system in my solution. I looked over web but found solution which is hard to…
Shakeeb Ahmed
  • 1,778
  • 1
  • 21
  • 37
3
votes
3 answers

how to give user specific file access in express js

I'm using express js and passport js as authentication system also using view engine. I'm looking for a solution that would give access to user and let users see their file, not the other one's file. for example, in the image folder, the user would…
3
votes
4 answers

What are the options of View Engines in Java?

As we can see in this question, there are lots of cool view engines to ASP.NET. But what about Java/JSP? What options do I have? Thanks
goenning
  • 6,514
  • 1
  • 35
  • 42
3
votes
3 answers

How to make razor the default view engine in existing project

I upgraded an MVC 2 project to MVC 3. How can I set the default view engine to Razor on an existing project? Edit: Sorry, I was rather unclear. I want to have Razor be the default type in the Add View dialog.
Matthew Nichols
  • 4,866
  • 4
  • 41
  • 48
3
votes
2 answers

ASP.NET Web Form Render Engine outputs a Control Tree? Looking for info on render logic

I've been watching a video on Scott Hanselmnn teaching MVC 2 tricks/tips. He mentions how MVC 2 by default uses ASP.NET Web Forms view engine to render the output of the views; he mentions that the web forms view engine is a little slower than it…
contactmatt
  • 18,116
  • 40
  • 128
  • 186
3
votes
0 answers

Compiling views on build in asp mvc using custom ViewEngine

In project we have implemented custom view engine inheriting from RazorViewEngine to solve custom views locations and logic behind choosing them. The problem is that if I enable bulding views on project build then I get erros from views that @model…
Mogget
  • 75
  • 5
3
votes
1 answer

How to preselect value in dropdown using Nancy SSVE

I don´t see how to preselect a dropdown using Super Simple View Engine. My model has a property datatype which is a number and I want to preselect this in the dropdown. As I see from documentation conditionals only work on boolean values. So using…
jens_h
  • 377
  • 3
  • 13