Reputation: 16460
Hey guys on my Base layout I have
<html lang="en" jsPageObject="@ViewBag.JSPageObject">
Then on the view, I have:
@{
ViewBag.Title = "Details";
ViewBag.JSPageObject = "MyDetails";
}
I've noticed the ViewBag.Title gets updated but not the JSPageObject..
Upvotes: 1
Views: 932
Reputation: 7216
Most probably the <html>
tag has already been rendered when you update the variable. Try setting it in your controller instead.
Upvotes: 3