Get html from Razor template (for sending e-mail body) in ASP CoreCan I use an ASP.Net MVC Razor view to generate an nicely formatted HTML Body as the input for an email sent from the server?How do you include .html or .asp file using razor?Why not inherit from List<T>?How to get all viewmodel fields which is used in ASP.NET Razor view template?Return View as String in .NET CoreHow to get compiled C# code from cshtml view in asp.net core?Email Sender Library with Razor (.cshtml) Templates. .net core 2.0Razor Class Library in ASP .Net Core 2.1.1Retrieve HTML output from Razor page (ASP.NET Core 2.1)How to send large string from JavaScript to Asp Net Core
Is it ok to put a subplot to a story that is never meant to contribute to the development of the main plot?
Is there an explanation for Austria's Freedom Party virtually retaining its vote share despite recent scandal?
How does apt-get work, in detail?
How is character development a major role in the plot of a story
Restoring order in a deck of playing cards
Different PCB color ( is it different material? )
How feasible is the Delta-Glider?
What are these (utility?) boxes at the side of the house?
How do you deal with an abrupt change in personality for a protagonist?
Comment dit-on « I’ll tell you what » ?
Transform the partial differential equation with new independent variables
If a massive object like Jupiter flew past the Earth how close would it need to come to pull people off of the surface?
Tic-Tac-Toe for the terminal
How does an ARM MCU run faster than the external crystal?
What is the difference between nullifying your vote and not going to vote at all?
How to capture more stars?
Draw a checker pattern with a black X in the center
Can the Help action be used to give advantage to a specific ally's attack (rather than just the next ally who attacks the target)?
Is there an evolutionary advantage to having two heads?
shutdown at specific date
Split polygon using another polygon in QGIS
What is a subpixel in Super Mario Bros, and how does it relate to wall clipping?
How were these pictures of spacecraft wind tunnel testing taken?
Can a wire having a 610-670 THz (frequency of blue light) AC frequency supply, generate blue light?
Get html from Razor template (for sending e-mail body) in ASP Core
Can I use an ASP.Net MVC Razor view to generate an nicely formatted HTML Body as the input for an email sent from the server?How do you include .html or .asp file using razor?Why not inherit from List<T>?How to get all viewmodel fields which is used in ASP.NET Razor view template?Return View as String in .NET CoreHow to get compiled C# code from cshtml view in asp.net core?Email Sender Library with Razor (.cshtml) Templates. .net core 2.0Razor Class Library in ASP .Net Core 2.1.1Retrieve HTML output from Razor page (ASP.NET Core 2.1)How to send large string from JavaScript to Asp Net Core
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I need to convert the Razer template to html conversion in ASP.Net Core.
// TODO: Get html
string body = GetCompiledHtmlStringFromRazor
("~/Views/EmailTemplates/PasswordResetEmailTemplate.cshtml", viewModel);
Any source code for making this process simple.. ?
c# asp.net-core razor
add a comment |
I need to convert the Razer template to html conversion in ASP.Net Core.
// TODO: Get html
string body = GetCompiledHtmlStringFromRazor
("~/Views/EmailTemplates/PasswordResetEmailTemplate.cshtml", viewModel);
Any source code for making this process simple.. ?
c# asp.net-core razor
add a comment |
I need to convert the Razer template to html conversion in ASP.Net Core.
// TODO: Get html
string body = GetCompiledHtmlStringFromRazor
("~/Views/EmailTemplates/PasswordResetEmailTemplate.cshtml", viewModel);
Any source code for making this process simple.. ?
c# asp.net-core razor
I need to convert the Razer template to html conversion in ASP.Net Core.
// TODO: Get html
string body = GetCompiledHtmlStringFromRazor
("~/Views/EmailTemplates/PasswordResetEmailTemplate.cshtml", viewModel);
Any source code for making this process simple.. ?
c# asp.net-core razor
c# asp.net-core razor
edited Mar 24 at 13:16
Mark Macneil Bikeio
asked Mar 24 at 8:45
Mark Macneil BikeioMark Macneil Bikeio
1,0941427
1,0941427
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
For .Net use RazorEngine
https://github.com/Antaris/RazorEngine
Use .NetCore use RazorEngine.NetCore
https://github.com/fouadmess/RazorEngine
This worked for me 👍
– Mark Macneil Bikeio
Mar 24 at 13:50
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322039%2fget-html-from-razor-template-for-sending-e-mail-body-in-asp-core%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
For .Net use RazorEngine
https://github.com/Antaris/RazorEngine
Use .NetCore use RazorEngine.NetCore
https://github.com/fouadmess/RazorEngine
This worked for me 👍
– Mark Macneil Bikeio
Mar 24 at 13:50
add a comment |
For .Net use RazorEngine
https://github.com/Antaris/RazorEngine
Use .NetCore use RazorEngine.NetCore
https://github.com/fouadmess/RazorEngine
This worked for me 👍
– Mark Macneil Bikeio
Mar 24 at 13:50
add a comment |
For .Net use RazorEngine
https://github.com/Antaris/RazorEngine
Use .NetCore use RazorEngine.NetCore
https://github.com/fouadmess/RazorEngine
For .Net use RazorEngine
https://github.com/Antaris/RazorEngine
Use .NetCore use RazorEngine.NetCore
https://github.com/fouadmess/RazorEngine
answered Mar 24 at 13:47
Mark Macneil BikeioMark Macneil Bikeio
1,0941427
1,0941427
This worked for me 👍
– Mark Macneil Bikeio
Mar 24 at 13:50
add a comment |
This worked for me 👍
– Mark Macneil Bikeio
Mar 24 at 13:50
This worked for me 👍
– Mark Macneil Bikeio
Mar 24 at 13:50
This worked for me 👍
– Mark Macneil Bikeio
Mar 24 at 13:50
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55322039%2fget-html-from-razor-template-for-sending-e-mail-body-in-asp-core%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown