title: How to pass generic parameter to partial view
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/875085/generic-partial-view-how-to-set-a-generic-class-as-model">Generic partial view: how to set a generic class as model?</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to build common functionality using generic types but got stuck with below scenario. </p>
  
  <p>View Model</p>
  
  <pre><code>public class DeleteForm&lt;T&gt;  
  {
      public LogInfo Ticket { get; set; }
      public string Id { get; set; }
  
      public DeleteForm() {
        Ticket = new LogInfo();
      }
  
      public DeleteForm(T viewModel) : this() {
        ViewModel = viewModel;
      }
  
      public T ViewModel { get; set; }
  }
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>public ActionResult Index(string name)
  {
     return View("index", new DeleteForm&lt;List&lt;Users&gt;&gt;(new List&lt;Users&gt;());
  }
  </code></pre>
  
  <p>List Screen</p>
  
  <pre><code>@model DeleteForm&lt;List&lt;Users&gt;&gt;
  //gridview displays list of users
  @Html.Partial("revisionwindow", Model)
  </code></pre>
  
  <p>Partial View</p>
  
  <pre><code>@model DeleteForm&lt;T&gt; &lt;---Its not working
  
  @Html.EditorFor(o=&gt;o.Ticket)
  @Html.EditorFor(o=&gt;o.Id)
  </code></pre>