Read stuff from viewbag after rendering
mattiasnordqvist opened this issue · comments
It should be possible to read data from the the viewbag after rendering, so that a template like this can output the subject and from values.
@model RazorTemplates.Letter
@{
ViewData["Subject"] = "Very good subject";
ViewData["From"] = "support@hello.com";
}
<!doctype html>
<html>
<head>
...
Hey @mattiasnordqvist, thanks for raising this. I'm not sure how possible is this. But still I can have a look & let you know if this possible or not.
Thanks
Hey @mattiasnordqvist, the razor renderer doesn't provide these back to the caller other than the rendered string. Hence, it's not possible to implement this. I'm closing the issue. Thanks for your suggestion.