Possible Duplicate:
Render a view as a string
I want to load a View into a variable so I can send it via Mail.
I'd want it to work like this:
var mail = new SmtpClient();
var mailView = View("registration.cshtml", userModel);
mail.Send(FromAddress, userModel.Email, mailView.ViewBag.Title, mailView.ToString());
everything but the ToString() works. How do I force MVC to compile the view?