title: asp.net webform pattern re-use same page (view and edit)
body: <p>i'm working on a project which aim is to create a sort of social portal.</p>
  
  <p>The matter is that i've an entity page detail where user can edit it or just view it.
  I'm considering to create just one page and using that as view only and edit mode at the same time. 
  I had two ideas:</p>
  
  <p>1) create an enumeration ControlBehaviour { EditMode, ViewMode } in Session and using that to understand if I have to set readonly every controls in my page;</p>
  
  <p>2) use jquery to set readonly every controls in the page if i have to open it in viewmode (or not readonly if i have to open it in edit mode).</p>
  
  <p>Does it exist any pattern to reach my aim?
  best regards</p>