Is there a way to check the contents of the viewbag that the viewbag has data in the view. my controller sends, possibly, new data every time I press a button and send it with the same name.
here is my controller
public ActionResult Details(string IncomRequest, Int Id) { // some code...... switch (IncomRequest) { case ("Order"): ViewBag.Query = list<Ordr> Ord; break; case ("Process"): ViewBag.Query = lis<Process> pro; break; } return view();
In my opinion, I want to check whether the viewing bag contains Ord or pro.
source share