0
我有一個局部視圖MVC通消息查看
if (CompanyFound != null)
{
Products = DB.tblBuyOnlineMasters.Where(c => c.CompanyID == CompanyID).OrderByDescending(p => p.BuyOnlineID).ToList();
if (Products.Count < 1)
{
ViewBag.Msg = "No products found for this company";
}
}
else
{
ViewBag.Msg = "Company Not Found (Showing result from all companies)";
}
我需要在主視圖中顯示的數據
<div class="col-sm-8" style="background-color: rgb(231, 231, 231)">
@{
Html.RenderPartial("ProductRepeater");
}
<h4 style="text-align: center;">
@ViewBag.Msg
</h4>
</div>
的ViewBag方法沒有傳輸數據