title: How to work with a partial view within a view for same model?
body: <p>I have a simple form with below functionalities.</p>
  
  <ol>
  <li><p>First Part: It has a table which will display value from a database table, e.g. <code>tblProfile</code> and it contains three columns like <code>profileid, profilename, description</code> and in each row an edit button to edit values. </p></li>
  <li><p>Second Part: In the same page, I have three text boxes to enter the value to the same database table, e.g. <code>tblProfile</code>. After clicking on the submit button it will insert the value into the table and will immediately display it on the table mentioned above and based on the last <code>profileid</code> it will show the top+1 id in the <code>profileid</code> textbox. If any edit button clicked on the table, these three text boxes will be populated with the values. After modification they have to be updated.</p></li>
  </ol>
  
  <p>I have created a view which uses <code>IEnumerable&lt;MyModel&gt;</code> as model so that all the profile values are displayed in the table (strongly typed view). Now for the form part I have created a partial view which is also a strongly typed view but instead of <code>IEnumerable&lt;MyModel&gt;</code> it uses <code>MyModel</code> as its model type.</p>
  
  <p>I amd confused about where I should put the Save, Update, Cancel etc. buttons: in the main view or in the partial. How to complete the functionality? I am using VS2010 SP1 and MVC4 and EF in the Main solution, which has one MVC project, an two folders: BusinessLayer and DataAccesLayer. The BusinessLayer folder contains separate class libraries for BO and BA, and the DataAccesLayer folder contains a class library file, and two other folders one for EF .edmx file and other one for DA class.</p>
  
  <p>How can I implement this?</p>
  
  <p><img src="https://i.stack.imgur.com/r33V1.png" alt="enter image description here"></p>