title: ASP.NET MVC3 Call Controller Method from View
body: <p>Below is an abstract of my Controller and View.  I would like to call the method GetUserDistinguished from the View.  This is only cosmetic.  The Guid is ugly and doesn't make sense to the end user, but it's the unique ID I am using for users.</p>
  
  <pre><code>namespace Users.Controllers
  { 
      public class UsersController : Controller
      {
  
          public ViewResult Index()
          {    
              var users = db.Users.Include("Users");    
              return View(users.ToList());
          }
  
          public string GetUserDistinguished(string Guid)
          {
              return ADHelper.ConvertGuidToDn(Guid);
          }
      }
  }
  
  
  
  
  
  @model IEnumerable&lt;Test.GuidToDistinguishedName&gt;
  
  @{
      ViewBag.Title = "Index";
  }
  
  &lt;h2&gt;Index&lt;/h2&gt;
  
  &lt;p&gt;
      @Html.ActionLink("Create New", "Create")
  &lt;/p&gt;
  &lt;table&gt;
      &lt;tr&gt;
          &lt;th&gt;
              Name from Guid
          &lt;/th&gt;
      &lt;/tr&gt;
  
  @foreach (var item in Model) {
      &lt;tr&gt;
          &lt;td&gt;
              @Html.DisplayFor(modelItem =&gt; item.Guid)
          &lt;/td&gt;
      &lt;/tr&gt;
  }
  
  &lt;/table&gt;
  </code></pre>