title: Sitecore Auto-Save If Sublayout Added on the Page
body: <p>Is there anyway to make auto-save once I added a sublayout component?</p>
  
  <p>I created one sublayout and if I add it on the page in page editor, it doesn't appear on that time. By saving the item, it appears on the page editor.</p>
  
  <p>So, I'd like to make if sublayouts are added on the page, then make the page automatic save.</p>
  
  <p>Is it possible?</p>
  
  <p>===== Update =====</p>
  
  <p>This is the end of CreateNewDatasource Method and it updates Rendering Layout field.</p>
  
  <pre><code>//set datasource, save and close
  myItem.Editing.BeginEdit();
  myDataSourceItem = myItem.Add(newName, template);
  rd.Datasource = myDataSourceItem.ID.ToString();
  myItem[Sitecore.FieldIDs.LayoutField] = ld.ToXml();
  myItem.Editing.EndEdit();
  myItem.Editing.AcceptChanges();
  
  return myDataSourceItem;
  </code></pre>