Questions tagged [viewengine]

262 questions
1
vote
1 answer

Tehnology for generating xml similar to a razor or any other view engine

I am currently making a website that returns quite a few xml types and some of them are quite big. I don't really need to resort to xml serialization because it would be a bit slow in my case and some class fields must be only partially serialized…
Alecu
  • 2,627
  • 3
  • 28
  • 51
1
vote
1 answer

How do I clear the view file location cache used by the ViewEngine in ASP.Net MVC 3

The ViewEngine in ASP.Net MVC 3 caches the physical paths of the views and partial views which is causing errors when I add or move view files in my production environment. Is there a way I can clear that cache at runtime? I found one article online…
Brad Urani
  • 1,429
  • 1
  • 16
  • 29
1
vote
1 answer

choosing perfect view engine for spring mvc projects

I was thinking to develop web project on spring mvc. But somehow I was stuck on developing view engine. I was little bit familiar with asp.net mvc. I know their view engine are very clean and nice. I worked with razor view. I liked it. Now my…
A N M Bazlur Rahman
  • 2,280
  • 6
  • 38
  • 51
1
vote
0 answers

Express Handlebars directory is not rendering result of views\home.handlebars . Asking for \views\layouts\main.handlebars'

I am trying to learn something new view engine but when I was reading the documentation on npm express-handlebars it showed directory structure like this : . ├── app.js └── views ├── home.handlebars └── layouts └── main.handlebars enter image…
1
vote
1 answer

Custom View Engine not finding a view

I've successfully created a custom view engine and able to browse custom views that are found in different location other than the default. eg/Views/Module1/Controller/ViewName Since my custom view engine overrides the default view route, it is…
Abdulhakim Zeinu
  • 3,333
  • 1
  • 30
  • 37
1
vote
2 answers

Unexpected token ')' in E:\portfolio\views\home.ejs while compiling ejs

I got an error while looping the array through forEach loop in ejs file of express js. According to my research, in the ejs file forEach loop is not working. Please check the error and the message below: Error SyntaxError: Unexpected token ')' in…
HamzaKhalid273
  • 355
  • 1
  • 4
  • 11
1
vote
0 answers

include header and footer not working with ejs

I'm new to js in general and trying to implement a simple ejs page using header and footer template. I followed the instruction from https://ejs.co/ but the header.ejs and footer.ejs are not successfully added into my list.ejs page My code for…
Tien Mai
  • 11
  • 1
1
vote
1 answer

Can't access views from different project using Razor View Engine

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 and use. Because currently, I have to copy-paste…
Yahya Hussein
  • 8,767
  • 15
  • 58
  • 114
1
vote
1 answer

MasterLocationFormats in WebFormViewEngine not used?

I tried to make the ViewEngine use an additional path using: base.MasterLocationFormats = new string[] { "~/Views/AddedMaster.Master" }; in the constructor of the ViewEngine. It works well for aspx and ascx(PartialViewLocationFormats,…
Mathias F
  • 15,906
  • 22
  • 89
  • 159
1
vote
3 answers

Calling another controller action after the current controller action has finished executing

What I am trying to achieve: After each view has finished executing I would like to make a separate http call to an external partner. I need to pass one of the view's content as body of that http call. What I have so far: I have a base controller…
anil
1
vote
1 answer

Do I need to use Babel in project which created backend service with Node.js and front end part with view engine with ejs?

I am a little bit confused. Someone says If you are going to develop pure Node.js projects, you don't have to worry about this. For web you should be aware of all of these tools. Someone says if you need to minimize production code use it. Purpose…
JohnW
  • 33
  • 4
1
vote
0 answers

I am trying to pass the Reset Token link to ejs engine but when the mail sent the anchor tag doesn't show the href attribute

I am using this syntax in ejs engine to send a clickable link to the email but it's not working. href attribute is not showing anything. But the anchor tag has the value like this Please tell me if I am doing something wrong. Thanks in advance.
1
vote
0 answers

Render React JSX template page: error unexpected < token

I am using React for my main app that is started after user logs in. Before user logs in I have several pages (log in, sign up, error, reset password) that are outside of the main app. For the main app I set the view engine to be: app.engine('jsx',…
Nikita Vlasenko
  • 4,004
  • 7
  • 47
  • 87
1
vote
0 answers

Process a string which contains Razor syntext in html and javascripts

If we write the following code directly in a cshtml file: Then the @Method1 helper functions processes the data and returns a string. The output of the block is as following: