I have a partial view
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)";
}
I need to display the data in the main view
<div class="col-sm-8" style="background-color: rgb(231, 231, 231)">
@{
Html.RenderPartial("ProductRepeater");
}
<h4 style="text-align: center;">
@ViewBag.Msg
</h4>
</div>
The ViewBag method is not transporting the data
