title: Using ASP.NET Server Controls in MVC?
body: <p>On my current project I need to add a functionality that allows the user to view  a thumbnail of their uploaded PDF. I've found a <a href="http://www.tallcomponents.com/pdfthumbnail.aspx" rel="nofollow">handy component</a> that achieves this (the basic version is free, but it's enough for my current needs). Anyways, the control is pretty outdated (2010), therefore there doesn't seem to be MVC support. On the demos they depict usage of the control as such:</p>
  
  <p>The View's Markup:</p>
  
  <pre><code>&lt;form method="post" runat="server" enctype="multipart/form-data"&gt;
         &lt;asp:Panel ID="thumbnailsPanel" runat="server" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The thumbnail control is instantiated via code, the byte array which represents the thumbnail is passed to the control and the control is added to <code>thumbnailsPanel</code></p>
  
  <pre><code>&lt;script runat="server"&gt;
  protected void DisplayThumbs_Click( object sender, System.EventArgs e )
  {
        Thumbnail thumbnail = new Thumbnail();
        thumbnail.SessionKey = sessionID;
        thumbnail.Index = i;
        thumbnailsPanel.Controls.Add( thumbnail );
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Given that I can't declare a <code>Thumbnail</code> control in my razor view, how would I used this control in MVC? I've spent a few hours trying to make this control MVC friendly to no avail, the best I've come up with is to include a .ASPX view (not.cshtml) in my project and render the Thumbnail control on that view. Obviously this is not desirable. </p>
  
  <p>So how would you go about using a ASPX server controls in MVC? Is the idea a bad one altogether and should not be practised?</p>