Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IActionResult Index()
- {
- ViewBag.Test = "Hello world!!!";
- string htmlContent = "<html><head><title>Test page</title><body>@ViewBag.Test</body></html>";
- return GetViewFromString(htmlContent);
- }
- services.SetupOptions<RazorViewEngineOptions>(options =>
- {
- var expander = new LanguageViewLocationExpander(
- context => context.HttpContext.Request.Query["language"]);
- options.ViewLocationExpanders.Insert(0, expander);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement