title: Asp.Net MVC: using HTML tags in @Html:Grid
body: <p>Is it possible to use inline HTML inside a @Html.Grid (I'm trying to create a hyperlink tag in one of the columns).  Here is an example:</p>
  
  <pre><code>@model Example.Models.ExampleItems
  
  @{
      ViewBag.Title = "Example Items";
  }
  
  &lt;div id="ExampleContentInnerContainer"&gt;
  &lt;h2&gt;Example Items&lt;/h2&gt;
  
  &lt;div id="ExampleListGrid"&gt;
      &lt;span class="ExampleGrid"&gt;
      &lt;p&gt;
          @Html.Grid(Model.ExampleList).Columns(c =&gt;
          {
              c.For(a =&gt; a.Example.Mandatory == true ? "Yes" : "No").Named("Mandatory");
              c.For(a =&gt; string.Format("{0:dd/MM/yyyy}", a.DateRequested)).Named("Date Requested");
              c.For(a =&gt; string.Format("{0:dd/MM/yyyy}", a.DateDeadline)).Named("Deadline Date");
              c.For(a =&gt; string.Format("{0:dd/MM/yyyy}", a.DateReceived)).Named("Date Received");         
              c.For(a =&gt; a.Comment).Named("Comment");
              c.For(a =&gt; a.Name).Named("Checklist type");
              c.For(a =&gt; @:&lt;a href="www.google.com" /&gt;);
          }
          )
      &lt;/p&gt;
      &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>Any help would be welcomed.</p>
  
  <p><strong>UPDATE</strong> - based on archil's post, my new code has become:</p>
  
  <pre><code>@model Example.Models.ExampleItems
  
  @{
      ViewBag.Title = "Example Items";
  
      Func&lt;dynamic, object&gt; updateLink = @&lt;a href="#?w=500" rel="Checklist_Popup" class="poplight"&gt;@item&lt;/a&gt;;
  }
  
  &lt;div id="ExampleContentInnerContainer"&gt;
  &lt;h2&gt;Example Items&lt;/h2&gt;
  
  &lt;div id="ExampleListGrid"&gt;
      &lt;span class="ExampleGrid"&gt;
      &lt;p&gt;
          @Html.Grid(Model.ExampleList).Columns(c =&gt;
          {
              c.For(a =&gt; a.Example.Mandatory == true ? "Yes" : "No").Named("Mandatory");
              c.For(a =&gt; string.Format("{0:dd/MM/yyyy}", a.DateRequested)).Named("Date Requested");
              c.For(a =&gt; string.Format("{0:dd/MM/yyyy}", a.DateDeadline)).Named("Deadline Date");
              c.For(a =&gt; string.Format("{0:dd/MM/yyyy}", a.DateReceived)).Named("Date Received");         
              c.For(a =&gt; a.Comment).Named("Comment");
              c.For(a =&gt; a.Name).Named("Checklist type");
              c.For(a =&gt; updateLink("Update"));        
          }
          )
      &lt;/p&gt;
      &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>