title: Get last segment of URL path with MVC Razor
body: <p>I have this URL: <code>http://localhost:.../home/blogpost/#'I want to get this string'</code></p>
  
  <p>I get it when pressing:</p>
  
  <pre><code>&lt;a href="/home/blogpost/#@item.Title"&gt;@item.Title&lt;/a&gt;
  </code></pre>
  
  <p><code>@item.Title</code> is from my database and that string will change. Now I need to get the <code>'I want to get this string'</code> string on that page so that I can do a <code>if</code> statement with it, like this:</p>
  
  <pre><code>@if(@item.Title == 'I want to get this string')
  </code></pre>
  
  <p>Any suggestions?</p>