title: How can I generate url from non-controller static class in asp.net mvc 2 project?
body: <p>I have created Html helper class in asp.net mvc2 project:</p>
  
  <pre><code>public static class CaptionExtensions
  {
      public static string Captions(this HtmlHelper helper, Captions captions)
      {
          var sb = new StringBuilder();
          sb.AppendLine("&lt;ul&gt;");
  
          foreach (var caption in captions)
          {
              //  var url = Url.Action("CaptionCategory", new {id = caption.Code} )
  
              sb.AppendLine("&lt;li&gt;");
              sb.AppendLine(  "&lt;a href="+ url + "&gt;");
              sb.AppendLine(      caption);
              sb.AppendLine(  "&lt;/a&gt;");
              sb.AppendLine("&lt;/li&gt;");
          }
  
          sb.AppendLine("&lt;/ul&gt;");
  
  
          return sb.ToString();
      }
  }
  </code></pre>
  
  <p>I need to generate url similar with the way in commented line. Commented code is how I do it in the controller class, but this is helper class (static context). Any help???</p>