0
爲什麼此頁面不顯示佈局或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>