razorengine Questions

2

Solved

I have an MVC 4 application that sends out multiple emails. For example, I have an email template for submitting an order, a template for cancelling an order, etc... I have an Email Service with m...
Champac asked 22/4, 2015 at 16:24

4

using RazorEngine outside asp.net I'm experiencing this error when I try to write raw html by using @Html.Raw("html string here"): Unable to compile template. The name 'Html' does not exist in t...
Azotobacter asked 12/5, 2014 at 7:46

5

I've been trying to use RazorEngine in a little project of mine but can't get past this error when I try to use template layouts. Unable to compile template. 'object' does not contain a definit...
Poplar asked 11/11, 2012 at 2:35

5

Solved

I know this is probably going to be something very simple and it is like just a 'gotcha' that I have yet to get; however, I have been struggling with escaping the @ symbol in the following URL. &l...
Troxell asked 28/5, 2014 at 8:9

1

Generated project view.dll)I have tried couple of products - dotPeek, JustDecompile and .Net Reflector, all of them are good at decompiling cs file from a dll. However, I am looking for one that ca...
Ira asked 2/1, 2020 at 3:31

0

I am trying to generate HTML based on a .cshtml file, which is embedded: <EmbeddedResource Include="Templates\ReportTemplate.cshtml" /> However, from RazorLight I always get the fo...
Langobardic asked 4/8, 2021 at 6:19

2

I have to create a Asp.Net Web Api that is capable of sending emails. I managed in sending the email but only with a simple template stored in a variable, locally. The next step was to render a tem...
Lacedaemon asked 19/11, 2018 at 15:5

3

Solved

My goal is to generate a <select> dropdown with a certain select value (<option>) pre-selected, so the finalized HTML should look like this: <select> <option value = "1&q...
Thimble asked 13/12, 2017 at 15:46

2

I'm trying to render a HTML from a view without using a web request. I need the HTML as a string, internally, I do not wish to serve it. The viewEngine.FindView() returns a viewEnineResult that sho...
Patina asked 16/5, 2017 at 8:40

2

Solved

Goal I'm trying to generate a HTML string on the backend as I want to convert it to a PDF using a HtmlToPDF library. I also want to be able to easily see the generated HTML in the browser, for deb...

1

Solved

I want to simplify the following @if (Template != null) { @Template } else { <span>No contents!</span> } with either ?? or ?. Is it possible? Attempt My attempts below @Template?.Be...
Packton asked 3/7, 2020 at 2:1

1

Solved

The error that I get is this (no more info) : System.StackOverflowException Everything in my project is working fine but as soon as I post a data and after that, it should return view I get that e...
Padraic asked 9/2, 2020 at 12:37

2

Solved

I am using ASP.NET MVC 5 to develop my website. I'm using Grunt to minify my CSS and JS. Everything works fine, but I need to change the route source of my files if I'm making a publish (release mo...
Bias asked 8/2, 2015 at 22:30

2

I'm using the RazorEngine without the MVC-Framework. That means I don't have the HtmlHelper for creating templates. That's fine, I don't need any methods from it anyway. But I need to create my ow...
Impact asked 4/8, 2013 at 20:0

8

Solved

I am using RazorEngine to render out some basic content (a very crude content management system). It works great until I include any @Html syntax into markup. If the markup contains an @html I ge...
Lamellicorn asked 19/12, 2011 at 12:12

4

Solved

I am using the Razor engine https://github.com/Antaris/RazorEngine to parse the body of my email templates. Is it possible to define a layout and include other .cshtml files? for example a common h...
Sibby asked 10/7, 2012 at 13:18

1

I reuse the same partial for a RazorEngine email using RazorEngine.Parse, but when I use the same Partial in a regular view new RazorEngine.Text.RawString doesnt work and doesnt ignore HTML. I cant...
Burris asked 20/9, 2018 at 21:27

1

I get the below error when I open RazorEngine cshtml template file in my VS 2015 project. Feature 'implicitly typed local variable' is not available in c# 2. Please use language version 3 or g...
Nonalcoholic asked 20/3, 2017 at 10:4

3

Solved

I'm simply entering "MyMessages/Index" after localhost:51531/ and this popup is being displayed. Seems super weird to me but probably something simple. So I try to navigate to localhost:51531/MyM...

2

My solution consist of 2 projects: MyApp.Rest MyApp.Core Core uses Razor templating to generate emails and reports. Rest is a WebAPI only and references Core. Rest has the startup file, where R...
Skimp asked 19/6, 2018 at 18:24

2

I am writing simple consoleApp (netcoreapp2.0) <Project Sdk="Microsoft.NET.Sdk"> and want to run webserver with mvc. class Program { static void Main(string[] args) { WebHost.CreateDef...
Mok asked 21/9, 2017 at 11:30

2

I am using ASP.Net MVC with Razor syntax in Views. But with little research on performance enhancements I have found that View Engines takes a time to compile razor code to HTML. So is it good idea...
Quarry asked 26/10, 2017 at 15:9

2

I am trying to use a .cshtml template to send an email with RazorEngine. The documentation on their site shows how to use it with a string containing the razor syntax. How would I go about using it...
Erickericka asked 8/6, 2016 at 15:38

2

Solved

I'm developing an asp.net mvc 5 application in which I was trying to redirect to the ReturnUrl by applying the code below : [HttpPost] [AllowAnonymous] public ActionResult Login(UserLogin model, s...
Frech asked 14/12, 2015 at 15:3

1

I am using Razor Engine to dynamically compiling my razor view from the database. Now im using Razor Engine 3.7.3. I saw few posting about how to read html helper and compile it, but it was for the...
Hoeve asked 6/11, 2015 at 11:15

© 2022 - 2024 — McMap. All rights reserved.