title: How to know the caller route for Index of a controller in ASP.NET?
body: <p>So I have a something like this in my cshmtl:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div&gt;
      &lt;a href=&quot;/cars&quot;&gt;&lt;/a&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;a href=&quot;/bikes&quot;&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  <p>So it goes to cars controller and hits the function below:</p>
  <pre class="lang-cs prettyprint-override"><code>[HttpGet]
  [Route(&quot;cars&quot;)]
  [Route(&quot;bikes&quot;)]
  public ActionResult Index()
  {
      //here I want to set up if else depending on if cars got called or bikes
      return View();
  }
  </code></pre>
  <p>In the index function, I wanna know through some if else which route got called. Maybe using view bag or something?</p>