asp.net mvc - How to render a view from the Service layer? -


I am including a feature in my web application which notifies a user by e-mail.

Now when I want to format HTML to this email, I am wondering if it is to reuse the main functionality of ASP.NET MVC and partial view for a string , So that I can make a partial view with the contents of the e-mail. The service level will provide the necessary models for the code view.

You can see the renderview method of the view.

Keep in mind that these methods take an object, which you will need to look at yourself, relevant data and one. I'm not sure that the properties in the ControllerContext are actually used by the view.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -