title: MvcHtmlString MVC 2 Conversion Error
body: <p>I <a href="http://blog.martin.aatmaa.net/2010/02/09/manually-upgrading-an-asp-net-mvc-1-0-application-to-asp-net-mvc-2-rc2" rel="noreferrer">converted my project</a> from MVC 1 to MVC 2 and Visual Studio 2008 gives me the following error:</p>
  
  <pre><code>Error   1   'System.Web.Mvc.MvcHtmlString' does not contain a definition for 'Substring' and no extension method 'Substring' accepting a first argument of type 'System.Web.Mvc.MvcHtmlString' could be found (are you missing a using directive or an assembly reference?) C:\Dev\SapientFansite\SapientFansiteApplication\SapientFansiteWeb\Code\ExtensionMethods\Html.cs 68  75  SapientDevelopment.SapientFansite.Web
  </code></pre>
  
  <p>Here is the code the error is pointing to. It is specifically having trouble with the "linkHtml.Substring(0, 2)".</p>
  
  <pre><code>     var linkHtml = htmlHelper.ActionLink(linkText, actionName, controllerName);
       if (isActiveMenuItem) {
          linkHtml = string.Format("{0} class=\"active\" {1}", linkHtml.Substring(0, 2), linkHtml.Substring(3));
       }
       return linkHtml;
       }
  </code></pre>
  
  <p>I suspect that it has something to do with a missing reference or something but I'm at a loss.</p>