title: Calling a Partial View and passing multiple ViewBag values as parameters
body: <p>I have the following</p>
  
  <pre><code>public ActionResult Index()    
  {
   ViewBag.Stage1="Module1";
   ViewBag.Stage2="Module2";
   ....
  }
  </code></pre>
  
  <p>Now within View I am calling a partial View and passing ViewBag </p>
  
  <pre><code>@Html.Partial("MyMenu", new ViewDataDictionary(new { Stage1= ViewBag.Stage1, Stage2= ViewBag.Stage2}))
  </code></pre>
  
  <p>But here I am getting error 'object' does not contain a definition for 'Stage1'
  I even tried using something like  </p>
  
  <pre><code>@Html.Partial("_LeftMenu", new {Level1=ViewData["Level1"],Level2=ViewData["Level2"] })
  </code></pre>
  
  <p>The same thing continues here as well the thing is I need to pass two values and render some Html based on values in ViewBag. Thanks any help is highly appreciated. Please correct me if I am wrong somewhere. Thanks.</p>