Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read stuff from viewbag after rendering #70

Open
mattiasnordqvist opened this issue Mar 23, 2024 · 1 comment
Open

Read stuff from viewbag after rendering #70

mattiasnordqvist opened this issue Mar 23, 2024 · 1 comment

Comments

@mattiasnordqvist
Copy link

mattiasnordqvist commented Mar 23, 2024

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"] = "[email protected]";
}
<!doctype html>
<html>
<head>

...
@soundaranbu
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants