title: ASP.NET MVC - Single view for Edit and Read only?
body: <p>We have a situation where we need a read only version of an edit page. This is permission based as well as based on the status of the object. My thought is to separate this out into a completely new view but the other opinions are to place this logic in the edit view.</p>
  
  <p>Some information about how the view is structured:</p>
  
  <p>Form elements</p>
  
  <p>Editor templates</p>
  
  <p>Partial views</p>
  
  <p>Kendo controls (fluent wrappers)</p>
  
  <p>So in order to complete the task at hand means the read only functionality needs to exist in multiple places and must be passed to editor templates / partial views by view data.</p>
  
  <p>There is also HTML helpers / extensions that are being used on the page which means updating these too.</p>
  
  <p>Lastly, with the Kendo controls, a lot of the logic of the grid (in-line editing functionality) logic exists in external JS files so we have yet another place to modify the code.</p>
  
  <p>My question is what is the 'best practice' in this regard? </p>
  
  <p>Do we duplicate mark-up (cshtml) by separating the read only view from the edit view.</p>
  
  <p>Or do we change the edit view to accommodate the read only functionality?</p>
  
  <p>It just seems like changing the edit view will add a whole lot of complexity and dependencies for such a trivial task.</p>