viewengine Questions

4

Solved

Scenario: I had developed some transactional pages using Node.js, Express + Handlebars as view engine and MongoDB. Now the issue is during module integration I got some of the pages which are buil...
Ize asked 25/2, 2013 at 8:57

1

I have a use case where I have many web projects that all use the same management general-purpose web pages, so I started to isolate my views to a separate project where all solutions can reference...
Atherton asked 14/12, 2020 at 23:38

3

Solved

I have a 2-level menu item: I have a list of department and each department has a list of stores. I have a Menu, PartialView which iterates through the Model (departments) and builds the menu: @m...
Yardage asked 27/11, 2018 at 7:3

15

Solved

I am looking for a .net templating engine - something simple, lightweight, stable with not too many dependencies. All I need it for at the moment is creating templated plain text and html ema...
Omnidirectional asked 4/12, 2008 at 10:6

4

Solved

I have an MVC app that uses dynamic business objects that are inherited from a parent object type. For example the base class Client might have two sub classes called Vendor and ServiceProvider, an...
Warmongering asked 22/2, 2013 at 16:40

2

Solved

I want to have some default content for a section let suppose Footer. How can I do this. Also, what if I want to render a partial view as the default content. Thanks
Solvolysis asked 14/5, 2011 at 12:48

6

I am getting an error at run time when viewing my ASP.NET page in the browser. I am not getting any build errors however I am getting the following compiler error at runtime: Compilation Error De...
Kassa asked 23/2, 2012 at 3:52

3

We have an ASP.NET MVC 4 application with around 3000 views in it. We've decided to split this set of views into separated DLLs and compile it with RazorGenerator. We keep only main _Layout.cshtml ...
Kashmiri asked 23/11, 2012 at 10:38

6

Solved

I'm developing a site with Node.js + Express and using as view engine Hogan.js. This is my file app.js: /** * Module dependencies. */ var express = require('express') , routes = require('./ro...
Stab asked 8/10, 2012 at 14:18

5

Solved

I have a Page.cshtml similar to the following (that does not work): @{ Layout = "../Shared/Layouts/_Layout.cshtml"; var mycollection = (ViewBag.TheCollection as IQueryable<MyCollectionType&gt...
Maisonette asked 4/2, 2011 at 21:47

4

Solved

I have an MVC3 site using Razor as its view engine. I want my site to be skinnable. Most of the possible skins are similar enough that they can derive from a shared master layout. Therefore, I am ...
Esbenshade asked 2/4, 2011 at 20:16

8

Solved

I'm looking for a way to write the following code with less lines of code (maybe 5). I suppose I could do the same thing as the selected class but this razor syntax isn't looking pretty. <ul&gt...
Brachycephalic asked 27/9, 2010 at 0:45

4

Solved

Razor is prettier (and is new therefore cool). Webforms is something I am already familiar with. Naturally I would unquestionably go for the new thing to learn - Razor. But I have heard of two di...
Yehudi asked 10/3, 2011 at 14:32

3

Solved

I've always been searching for a best suitable ViewEngine for me in ASP.NET MVC, and after observing a ton of template engines in either JAVA, PHP, Python, Ruby, NodeJS... I found the jade template...
Tenotomy asked 7/9, 2011 at 7:53

2

Solved

I am using the following to render a partial view to a string... protected string RenderPartialViewToString(string viewName, object model) { if (string.IsNullOrEmpty(viewName)) viewName = Cont...

3

Solved

I want to know what are few advantages of Razor view engine other then its syntax over other view engines like Spark, NHaml or default aspx view engine. Also what is the performance difference betw...
Virge asked 18/1, 2011 at 7:16

5

Solved

I want to change view locations at runtime based on current UI culture. How can I achieve this with default Web Form view engine? Basically I want to know how implement with WebFormViewEngine some...
Aerospace asked 26/5, 2009 at 9:28

2

I'm grouping my Views, Controllers and models. The structure is ~/Controllers -- /_Shared -- -- /Views -- -- /Content -- -- /Scripts -- /Home -- -- /Models -- -- /Content -- -- /Scripts -- -- /Vi...
Latea asked 1/4, 2013 at 23:26

3

Solved

I have implemented a multi-tenant view engine similar to what is described here: http://weblogs.asp.net/imranbaloch/archive/2011/06/27/view-engine-with-dynamic-view-location.aspx Which let me o...
Lobo asked 10/5, 2013 at 22:53

2

Solved

I have an MVC project that requires there to be 2 different View folders. One is at ~/Views/ and one at ~/Framework/Views/. This is done by creating a custom view engine based on the razor view eng...
Beverly asked 7/3, 2013 at 22:15

1

Solved

I wonder if there is any way to extend razor view engine capabilities to handle some custom text/tag and parse/proceed before render. Assume that I use some special tag which is ${} as below: &lt...
Catacomb asked 16/1, 2013 at 14:27

2

Solved

Underscore.js does not have a compile function like ejs and jade, but does work as a Node.js module. Would someone please provide an example of how to make it work inside an Express app?
Densmore asked 26/7, 2011 at 4:39

1

In a custom viewengine in the FindView method, how can I see the Layout used? masterName is always empty. ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string mas...
Wyler asked 9/10, 2011 at 18:50

4

Solved

I am trying out the MVC3 Razor view engine, and one the features that I am exploring is the ability to unit test views. I have seen a number of examples where Razor views can be compiled into an a...
Geralyngeraniaceous asked 29/1, 2011 at 2:40

2

Solved

I have a custom view engine developed internally. In the same project, I would like to use Razor for some pages and my custom engine for some pages. How does MVC framework choose which engine to us...
Kaylil asked 27/11, 2011 at 9:49

© 2022 - 2024 — McMap. All rights reserved.