title: Can someone explain asp.net routing syntax to me?
body: <p>I am dealing with this code in a Web Forms scenario:</p>
  
  <pre><code>  public static void RegisterRoutes(RouteCollection routes)
    {
  
      Route r = new Route("{*url}", new MyRouteHandler());
      routes.Add(r);
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
      routes.IgnoreRoute("{resource}.gif/{*pathInfo}");
  
    }
  </code></pre>
  
  <p>Firstly, can anyone tell me where the defintion of {*pathInfo} is?
  <a href="http://msdn.microsoft.com/en-us/library/cc668201.aspx#url_patterns" rel="noreferrer">http://msdn.microsoft.com/en-us/library/cc668201.aspx#url_patterns</a> doesn't really define it. Does:</p>
  
  <pre><code>routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  </code></pre>
  
  <p>Match</p>
  
  <pre><code>/c/xyz.axd and 
  /b/c/xyz.axd and
  /a/b/c/xyz.axd 
  </code></pre>
  
  <p>Whereas</p>
  
  <pre><code>routes.IgnoreRoute("{resource}.axd");
  </code></pre>
  
  <p>Only matches</p>
  
  <pre><code>/xyz.axd
  </code></pre>
  
  <p>Secondly, in:</p>
  
  <pre><code>{*url}
  </code></pre>
  
  <p>What does * mean? And what does the expression as a whole mean. Is there somewhere this is clearly explained?</p>
  
  <p>Thirdly, is there a particular order I need to add these expressions to correctly ignore routes? I know {*url} is some kind of catchall, should the IgnoreRoutes come before or after it eg</p>
  
  <pre><code>routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  routes.IgnoreRoute("{resource}.gif/{*pathInfo}");
  Route r = new Route("{*url}", new MyRouteHandler());
  routes.Add(r);
  </code></pre>