title: Receive data from ASP.NET MVC url parameters
body: <p>I am new to the ASP.NET MVC framework. I am trying to get data from url parameters, then from my controller I want to return with ViewBag. </p>
  
  <p>But the problem is, when I type that url in the browser, in debug mode, the data is not being returned correctly. Please have a look at</p>
  
  <p><a href="https://i.stack.imgur.com/e35m0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e35m0.png" alt="picture1"></a> </p>
  
  <p><a href="https://i.stack.imgur.com/hsssE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hsssE.png" alt="picture2"></a> </p>
  
  <p>to see debug results. Any idea what's wrong here? </p>
  
  <p>The Url I am using is: </p>
  
  <pre><code>http://localhost:60617/CategoryResearch/test/name=john?id=33
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>public ActionResult test(string name, string id)
  {
      ViewBag.name = name;
      ViewBag.id = id;
  
      return View();
  }
  </code></pre>