为什么此页面不显示布局或ViewBag.Title? “MyChart”呈现正常,但是当调用“Write”函数时,它会用渲染图像替换所有页面内容。有没有办法在渲染图像之后或之前向页面添加更多内容?
@model cmCase.Models.xyz
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Index</h2>
<div class="well">
@{
var myChart = new Chart(width: 1000, height: 400, theme: ChartTheme.Green)
.AddTitle("Most Popular")
.AddSeries(name: "Employee", xValue: new[] { "Peter", "Andrew", "Julie", "Mary", "Dave" }, yValues: new[] { "2", "6", "4", "5", "3" })
.AddSeries(name: "Employee12", xValue: new[] { "Peter", "Andrew", "Julie", "Mary", "Dave" },yValues: new[] { "2", "6", "4", "5", "3" })
.Write();
}
</div>