prabhu p

prabhu p

  • NA
  • 181
  • 114.5k

How to hide view bag data in cshtml in mvc 5 razor

Jun 29 2020 7:47 AM
@Html.Partial("_Pharmacyinfo",(string)@ViewBag.Sourcepage) , I am passing this partial view from main view with view bag data,functionality working fine for me. but in main view Viewbag data dispalying at the end of the page.
 
if i removed the this line @Html.Partial("_Pharmacyinfo",(string)@ViewBag.Sourcepage)
from page that viewbag data render in cshtml get removed so i want to know how to pass a viewbag data without render in cshtml 

Answers (1)