prabhu p

prabhu p

  • 2k
  • 181
  • 98.1k

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)