<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7940224068014662697</id><updated>2024-11-08T17:08:54.124+02:00</updated><category term="sharepoint"/><category term="sharepoint2010"/><category term="commonIssues"/><category term="document library"/><category term="error"/><category term="ASPNet"/><category term="export"/><category term="gridview"/><category term="publishing pages"/><category term="asp.net"/><category term="Discussion board"/><category term="ErrorWebParts"/><category term="contentType"/><category term="custom pagelayout"/><category term="deployment step"/><category term="excel"/><category term="folders"/><category term="lists"/><category term="page layout"/><category term="retract solution"/><category term="sharepoint lists"/><category term="spusercodev4"/><category term="views"/><category term="webpart"/><category term="webparts"/><category term="word"/><category term="Active deployment configuration"/><category term="Display mode"/><category term="Documentlibrary column"/><category term="DraftVersionVisibility"/><category term="Recycle IIS Application Pool"/><category term="SPLimitedWebPartManager"/><category term="XSL"/><category term="add event receiver"/><category term="add item"/><category term="add web part"/><category term="approver"/><category term="ascx"/><category term="assembly"/><category term="breadcrumb"/><category term="content editor"/><category term="content types"/><category term="control template"/><category term="couldn&#39;t load assemnly"/><category term="csv"/><category term="culture"/><category term="customDocuments"/><category term="default home page"/><category term="delete list"/><category term="download document"/><category term="draftvivibility types"/><category term="field type"/><category term="hide approver column"/><category term="language"/><category term="list"/><category term="list view webpart"/><category term="lists approvers"/><category term="lists event receiver"/><category term="lookup"/><category term="masterpage"/><category term="modules"/><category term="multicolumn"/><category term="multiple site"/><category term="one library"/><category term="package"/><category term="page directive"/><category term="powerShell"/><category term="programatically"/><category term="rating column"/><category term="safe control"/><category term="sharepoint design"/><category term="subfolders"/><category term="tags"/><category term="taxonomypicker"/><category term="text document"/><category term="user control"/><category term="web"/><category term="weburl"/><category term="welcome page"/><category term="workflow"/><category term="xslt"/><title type='text'>SharePoint &amp;amp; .Net quick samples &amp;amp; tricks</title><subtitle type='html'>some interesting topics about SharePoint &amp;amp; .Net</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>61</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-5529299737626186284</id><published>2015-12-29T16:25:00.000+02:00</published><updated>2016-01-04T18:51:12.918+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>CRUD OPERATIONS USING SHAREPOINT 2013 RESTAPI &amp; ANGULARJS (PART3)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
First let&#39;s recap what we do in &lt;a href=&quot;http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013.html&quot; target=&quot;_blank&quot;&gt;Part1 &lt;/a&gt;which we made an overview about technology used then we explain details about design then we finished &lt;a href=&quot;http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013_4.html&quot; target=&quot;_blank&quot;&gt;Part2 &lt;/a&gt;by design all generic JavaScript we will use and layouts , all of these steps made to achieve the example below&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; box-sizing: border-box; color: #7b7b7b; font-family: lato, sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.196px; line-height: 19.6px;&quot;&gt;i&#39;m an employee in company and need to request vacation so i will log into sharepoint with my account and fill form then send vacation request , i need to see process flow where it located now or who is responsible for take an action for my task now, in other side if i&#39;m employee who has this task now i need to respond on this task.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7b7b7b; font-family: Lato, sans-serif; font-size: 14px; font-style: italic; letter-spacing: 0.196px; line-height: 19.6px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/blockquote&gt;
In this part we will implement lists that we will save data on it then we will implement both controllers.js and services.js for vacation module to finish our Demo :)&lt;br /&gt;
&lt;br /&gt;
To implement our demo we will create sharepoint list &quot;VacationType&quot; to store all types of vacations and &quot;EmployeeVacation&quot; to store submitted employee vacation.&lt;br /&gt;
&lt;br /&gt;
First we will create our sharepoint lists please follow following steps :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiScP1qNMKLbrON932OwQn3s-i33e5xr5nbJH8XXSdpLA-U_qn1RTfMZKSgN7iOijCsCfbYbbrK_el5lwT104DryzH01aL6FLfcGEfAth_KmjZ49GaUk_22uDprhECvjyrtkVwoJCs88ORB/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiScP1qNMKLbrON932OwQn3s-i33e5xr5nbJH8XXSdpLA-U_qn1RTfMZKSgN7iOijCsCfbYbbrK_el5lwT104DryzH01aL6FLfcGEfAth_KmjZ49GaUk_22uDprhECvjyrtkVwoJCs88ORB/s400/1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;create sharepoint project &quot;Demo.Employee&quot;.&lt;/li&gt;
&lt;li&gt;add new list item &quot;VacationType&quot;&lt;/li&gt;
&lt;li&gt;add new list item &quot;EmployeeVacation&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;add fields below to list :&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;DateFrom : date time field to store vacation start date.&lt;/li&gt;
&lt;li&gt;DateTo: datetime field to store vacation end date.&lt;/li&gt;
&lt;li&gt;VacationType: lookup field to &quot;VacationType&quot; list to set type of vacation.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;add event receiver to list to show MyTasks functionality in our demo in this event receiver we will assign task to logged in user once item added , you can replace event receiver with your workflow process if you have.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;code to assign task to logged in user&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/58ed8a919fbb3b138bb8.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1pxatjlGakcOvYPVl66al1LLjCvx07ntwcN3g2xbGOigDRhRmQj_1QVr8MCvOyD2ZTtNM9I8xVyKHajbSDZp5pUK7EOAt3EnKYiwYMwj2dOCN8dhxZ8tRMawOtJ9eGUAVgZPLw-TnlgYN/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1pxatjlGakcOvYPVl66al1LLjCvx07ntwcN3g2xbGOigDRhRmQj_1QVr8MCvOyD2ZTtNM9I8xVyKHajbSDZp5pUK7EOAt3EnKYiwYMwj2dOCN8dhxZ8tRMawOtJ9eGUAVgZPLw-TnlgYN/s1600/3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;add mapped folder to sharepoint Style Folder then create folders like image below :&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;services folder will contains all angular employee services&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;create &quot;EmployeeVacationService.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;contain all angular controller functionality to add new vacation request.&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/6673d57defece1bd72a6.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;create &quot;VacationTypeService.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;get data from vacation type sharepoint list&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/7b5187cdc111c4cc4f38.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;controllers folder will contains all angular employee controllers.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;create &quot;AddEmployeeVacationController.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;functionality for add employee vacation request.&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/613538d5e51aacc8d274.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;create &quot;AssignedEmployeeVacationController.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;controller to get all tasks assigned to current logged in user&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/b9d72a97c1d153adda58.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;create &quot;DetailsEmployeeVacationController.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;controller to show all details about selected vacation request.&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/c3d6e03b636342215f0b.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;create &quot;MyEmployeeVacationController.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;controller to get all vacations requested by current logged in user.&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/a3a9cbf7bbf79389dcc6.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;create &quot;ProcessEmployeeVacationController.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;controller to show the current process status of selected vacation.&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/7a01ebe6c85165bbb549.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimmlV7Xyh4gYO7fNiXrfZuO5KhTcgt26Es6JNWniY0z9YWSPEMo-KzJPj1AJHnHPeSaZxVVPav6WzcpsfoaNDOAPIKpECUexAAxYMWCrR3t5lftwyTPEnL9UaAq7VI2HplHNQWnMN4Dfyg/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimmlV7Xyh4gYO7fNiXrfZuO5KhTcgt26Es6JNWniY0z9YWSPEMo-KzJPj1AJHnHPeSaZxVVPav6WzcpsfoaNDOAPIKpECUexAAxYMWCrR3t5lftwyTPEnL9UaAq7VI2HplHNQWnMN4Dfyg/s320/4.png&quot; width=&quot;195&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;create visual webPart(farm solution) &quot;EmployeeVacationWebPart&quot; to render views&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;open &quot;EmployeeVacationWebPartUserControl.ascx&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;add all file references to webpart like below :&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/b321bfc88aaa842b6e97.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;&amp;nbsp;create &quot;Pages&quot; folder&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;add module &quot;EmployeePagesModule&quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; this module consist of page that register webpart created before on it.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;delete sample.txt&lt;/li&gt;
&lt;li&gt;add &quot;Management.aspx&quot; page to module&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;open page and write our magic code :&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/20a37ebf0b429dd8e341.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;update Element.Xml with code below :&lt;br /&gt;&lt;br /&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/ec06f6c8ee88ad411c3f.js&quot;&gt;&lt;/script&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj76DTnmpJ9UR-WC6R7Zx2K_vbrgeEJkvDZIZsPO0dCIFqg1KpBKfcwIQ3M-ofjyK2NIFwru7XYvCYnbgtHJMzwAppCO1I3zmKSduWXBHH79-o0ymaIWh6ok98eJ5MdAzT4hRB-5LGxaj8Y/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj76DTnmpJ9UR-WC6R7Zx2K_vbrgeEJkvDZIZsPO0dCIFqg1KpBKfcwIQ3M-ofjyK2NIFwru7XYvCYnbgtHJMzwAppCO1I3zmKSduWXBHH79-o0ymaIWh6ok98eJ5MdAzT4hRB-5LGxaj8Y/s320/6.png&quot; width=&quot;144&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Finally we Finished our demo with complete step by step implementation , if you have any question you&#39;re welcome anytime .&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/5529299737626186284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013_29.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/5529299737626186284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/5529299737626186284'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013_29.html' title='CRUD OPERATIONS USING SHAREPOINT 2013 RESTAPI &amp; ANGULARJS (PART3)'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiScP1qNMKLbrON932OwQn3s-i33e5xr5nbJH8XXSdpLA-U_qn1RTfMZKSgN7iOijCsCfbYbbrK_el5lwT104DryzH01aL6FLfcGEfAth_KmjZ49GaUk_22uDprhECvjyrtkVwoJCs88ORB/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-8163078412060443224</id><published>2015-12-04T14:47:00.000+02:00</published><updated>2016-01-04T18:51:00.638+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>CRUD OPERATIONS USING SHAREPOINT 2013 RESTAPI &amp; ANGULARJS (PART2)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
As we discussed in &lt;a href=&quot;http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013.html&quot; target=&quot;_blank&quot;&gt;Part1&lt;/a&gt;&amp;nbsp;we talked about why we going to use Angularjs with Sharepoint then we decided to explain our topic by demo&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; color: #7b7b7b; font-family: &amp;quot;lato&amp;quot; , sans-serif; font-size: 14px; letter-spacing: 0.196px; line-height: 19.6px;&quot;&gt;i&#39;m an employee in company and need to request vacation so i will log into sharepoint with my account and fill form then send vacation request , i need to see process flow where it located now or who is responsible for take an action for my task now, in other side if i&#39;m employee who has this task now i need to respond on this task.&lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
Check Final result of &amp;nbsp;&lt;a href=&quot;http://screencast.com/t/NvSDIXvLcI&quot;&gt;Demo &lt;/a&gt;&amp;nbsp;that we will do it now.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;u&gt;&lt;b&gt;NO PAGE LOADING ANY MORE :)&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
now we will start with first point which is &amp;nbsp;&quot;&lt;span style=&quot;background-color: white; box-sizing: border-box; font-family: &amp;quot;lato&amp;quot; , sans-serif; font-size: 14px; letter-spacing: 0.02em; line-height: 19.6px;&quot;&gt;&lt;b style=&quot;box-sizing: border-box; color: #7b7b7b; text-decoration: underline;&quot;&gt;Build Angularjs Structure&quot;&lt;/b&gt;&lt;span style=&quot;box-sizing: border-box;&quot;&gt; &amp;nbsp;, actually we have many type of structure when we start to use Angularjs but i prefer to use following structure but feel free to use your own :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;Example :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;Demo &quot;folder under Styles SharePoint mapped folder&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;lato&amp;quot; , sans-serif; font-size: 14px; letter-spacing: 0.02em; line-height: 19.6px;&quot;&gt;Employee &amp;nbsp;&quot;folder container&quot;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;controllers &quot;folder container&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;lato&amp;quot; , sans-serif; font-size: 14px; letter-spacing: 0.02em; line-height: 19.6px;&quot;&gt;AddEmployeeController.js &amp;nbsp;&quot;controller file&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;lato&amp;quot; , sans-serif; font-size: 14px; letter-spacing: 0.02em; line-height: 19.6px;&quot;&gt;services &quot;folder container&quot;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;lato&amp;quot; , sans-serif; font-size: 14px; letter-spacing: 0.02em; line-height: 19.6px;&quot;&gt;EmployeeServices.js &quot;services file&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;App.js &quot;main angularjs file&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;Directives.js &quot;common directive file&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;Messages.js &quot;file contain all common messages you will use in your project&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;services &amp;nbsp;&quot;folder contain most common service over project&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;utility.js &quot; common service file can use over project&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;Demo &quot;folder under Layouts SharePoint mapped file&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;add.html &amp;nbsp;&quot;view model&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;and now we will start our demo , open your visual studio :D :D&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;we will create 2 projects one for common functions and other specific for employee functionality.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;first step we will create general services that we will use it over sharepoint&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;1- create empty SharePoint project &quot;Demo.CommonUI&quot; as farm solution&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmrccaahXnCXBb1_sbFmi81OEWbRMf4aO701AOV2UVw59zRkGVo2GaKrKFAfyNHC57toe0qzhN9kb4u-izPaPMgFJWIv3hGT1DNWMIa6VyGvXb22Vl7bk26UwZTJZrjzwos5RD8Ip72jSD/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmrccaahXnCXBb1_sbFmi81OEWbRMf4aO701AOV2UVw59zRkGVo2GaKrKFAfyNHC57toe0qzhN9kb4u-izPaPMgFJWIv3hGT1DNWMIa6VyGvXb22Vl7bk26UwZTJZrjzwos5RD8Ip72jSD/s400/1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;2- create folder &quot;Demo&quot; under STYLES mapped SharePoint folder (Templates &amp;gt; Layouts &amp;gt; Styles)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUMIxIckmKg9khNAl0i_62kIgyXw90nHZvRPPEqaJnrrHRhUJICv6xOxoNKLbxbHiIXzZd4ScF24dxCWTK_o_t755Qq7mvNcghFO1stjas2Ueyf0e72agC7svL_dMijfRBy5VDk_7vKWjZ/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUMIxIckmKg9khNAl0i_62kIgyXw90nHZvRPPEqaJnrrHRhUJICv6xOxoNKLbxbHiIXzZd4ScF24dxCWTK_o_t755Qq7mvNcghFO1stjas2Ueyf0e72agC7svL_dMijfRBy5VDk_7vKWjZ/s1600/2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;3- create folder &quot;Vendor&quot; under demo folder&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif; font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;we will add add library will be used in our demo under this folder.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
add Angularjs framework files &amp;nbsp;under this folder you can download it through this link ,&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
actually i will use CDN links in my demo to save time., here is some prerequisite &amp;nbsp;libraries we will use in our project :&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;a href=&quot;http://code.jquery.com/jquery/&quot; target=&quot;_blank&quot;&gt;jquery&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://angularjs.org/&quot; target=&quot;_blank&quot;&gt;Angularjs &lt;/a&gt;: for angularjs functionality&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ng-table.com/#/&quot; target=&quot;_blank&quot;&gt;ng-table&lt;/a&gt; : for draw tables with full functionality (feel free to use your own library)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/jirikavi/AngularJS-Toaster&quot; target=&quot;_blank&quot;&gt;toaster &lt;/a&gt;: for show notification after api response.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/wongatech/angular-http-loader/blob/master/README.md&quot; target=&quot;_blank&quot;&gt;loader &lt;/a&gt;: for show loader if request required time.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://angular-ui.github.io/bootstrap/&quot; target=&quot;_blank&quot;&gt;UIBootstrap &lt;/a&gt;: for boot strap controls&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
my current vendor now will contain only files for &quot;loader&quot; and &amp;nbsp;i will use CDN for other libraries&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
so project now will look like:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdKsgosyzNzgNMxl5_jQWH7zOo0jGCUdck8aBOFgkEUQ6EdA_89jXZmWziIwgs9U7l-UPMdh0TyPFRhD_psO1o2sSsNfnqF6a9istKnRfDWdnfTbIjC3yXEfIWTm4ogvHFhARhEkVw3zDJ/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdKsgosyzNzgNMxl5_jQWH7zOo0jGCUdck8aBOFgkEUQ6EdA_89jXZmWziIwgs9U7l-UPMdh0TyPFRhD_psO1o2sSsNfnqF6a9istKnRfDWdnfTbIjC3yXEfIWTm4ogvHFhARhEkVw3zDJ/s320/3.png&quot; width=&quot;217&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4- create some common files&amp;nbsp;under &quot;Demo&quot; folder&amp;nbsp;&amp;nbsp; :&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&amp;nbsp;create &quot;app.js&quot; :&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;in code below we will handle routing of views and it&#39;s mapped controllers also we will add configuration for loader and inject all libraries that we will use in our project&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/7ff4ce868e4ab94d097f.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;create &quot;Directives.js&quot;:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;we will use it to create our own directives to use it in views, in code below i will use my custom datepicker and validation to validate FromDate &amp;amp; ToDate when employee submit vacation&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/549823d172b7578d49bc.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;create &quot;Messages.js&quot;:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;we will use it centralize out used messages accross system&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/81c44bf77a524b5a4a12.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;create folder &quot;services&quot;:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;create &quot;baseSvc.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;this file one of the most important files in our project here we will add all method GET,POST &amp;nbsp;that will call SharePoint RestApi.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/a8123136e9bcbd5e1a53.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;
&lt;li&gt;create &quot;UtilityService.js&quot;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;if you have any common function you can add it in utility.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/1ba3121a206953061858.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAt_tRrRrb4qFikMNqOUC9mbDCwL5AdeVMsQiC7H5Cx7oLKHx5WhuMEHoOFK5gbjBTlqI4V2-HsJqLvEAUtHdOm5Z80bceTezDC_rVZ-LHpOl-_S6EOPlkclFOivVLd54gFJBisJ40oAJq/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAt_tRrRrb4qFikMNqOUC9mbDCwL5AdeVMsQiC7H5Cx7oLKHx5WhuMEHoOFK5gbjBTlqI4V2-HsJqLvEAUtHdOm5Z80bceTezDC_rVZ-LHpOl-_S6EOPlkclFOivVLd54gFJBisJ40oAJq/s320/4.png&quot; width=&quot;194&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
5- now we need to create our views for all CRUD operations.&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;Add &quot;Layouts&quot; SharePoint mapped folder&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;create folder &quot;EmployeeVacation&quot; under &quot;Demo.commonUI&quot; folder add following files :&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;create &quot;add.html&quot; that will appear when employee need to request vacation&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/2c1b046fe87608746bc9.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;create &quot;details.html&quot; to show details about request.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/087f424be586fbca07e3.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;create &quot;MyRequests.html&quot; to show all requests created by logged in user.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/57d839c8925edf40e614.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;create &quot;MyTasks.html&quot; to show all tasks assigned to logged in user&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/d75536d2fff725712216.js&quot;&gt;&lt;/script&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;create &quot;process.html&quot; to show current task status&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/ee3a69bfc9aa3ce00e38.js&quot;&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0eON1xgylEMILqRjeMqsHlsTa4yA58e3CptQ6-PkY26Nzy31mK5-iWdUOP-MdLvOVj4ALI59buo_cluL7YyYexvmk0mMQBtiZGdk9RE1RfLHlliTIPyl1Q7IQ7A95hJtSdqW3yLlgL43/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC0eON1xgylEMILqRjeMqsHlsTa4yA58e3CptQ6-PkY26Nzy31mK5-iWdUOP-MdLvOVj4ALI59buo_cluL7YyYexvmk0mMQBtiZGdk9RE1RfLHlliTIPyl1Q7IQ7A95hJtSdqW3yLlgL43/s320/5.png&quot; width=&quot;230&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: lato, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: lato, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: lato, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;6 - At last we are going to create our page layout&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: lato, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;create folder &quot;PageLayouts&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: lato, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;under folder create module &quot;PageLayouts&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: lato, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;delete sample.txt&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: lato, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;add text file &quot;DemoManagementPageLayout.aspx&quot; then add magic code below :&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: lato, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;update file &quot;Elements.xml&quot; with code below :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;script src=&quot;https://gist.github.com/mohamedsamirahmed/ed2af9ec3181ec22c851.js&quot;&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJj-gMAzt3eEA6vdGxg1cbVQ-dKim4iYFlXzIiHDxPbNxwA1bQOET2UAkkn_y30lliAcc0bwMHJex_dXuua5MhpQJFqsI6B8gMDGBH0FI8-rz7dIRDmxuyTS3ykDWH4hkGP_esk8aj1LN/s1600/6-1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJj-gMAzt3eEA6vdGxg1cbVQ-dKim4iYFlXzIiHDxPbNxwA1bQOET2UAkkn_y30lliAcc0bwMHJex_dXuua5MhpQJFqsI6B8gMDGBH0FI8-rz7dIRDmxuyTS3ykDWH4hkGP_esk8aj1LN/s400/6-1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8u5TKNYM7T57IU6a09iDQzIRYyOQxbCnttQpoBXS9PmxDKwExsbAqSIZkkWNxrVWuxlmwGBklTlBlCZ2nuan0RxPhS4VVnb-USU8h7CSuNOkx5k1a2DfbxSXs851v5HwiCCueVM1Hdd0C/s1600/6-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8u5TKNYM7T57IU6a09iDQzIRYyOQxbCnttQpoBXS9PmxDKwExsbAqSIZkkWNxrVWuxlmwGBklTlBlCZ2nuan0RxPhS4VVnb-USU8h7CSuNOkx5k1a2DfbxSXs851v5HwiCCueVM1Hdd0C/s400/6-2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtaZ5v4xIUDmA7ymvtI3TvudpqThZzHVowdv7FBXYr1MinMErhQeX22-ciq0JcvmfocbMNwDcKfRPGGpYCInFJltXHbL8B5UiTmijQaao3CahS9_QDC9yBv9UJNa7RgTBiMbWnawPoabWc/s1600/6-3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtaZ5v4xIUDmA7ymvtI3TvudpqThZzHVowdv7FBXYr1MinMErhQeX22-ciq0JcvmfocbMNwDcKfRPGGpYCInFJltXHbL8B5UiTmijQaao3CahS9_QDC9yBv9UJNa7RgTBiMbWnawPoabWc/s320/6-3.png&quot; width=&quot;258&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;Finally we finished CommonUI Structure, congratulations :D .&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;in &lt;a href=&quot;http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013_29.html&quot; target=&quot;_blank&quot;&gt;Part3 &amp;nbsp;&lt;/a&gt;we will talk about&amp;nbsp;&lt;b&gt;&lt;u&gt;&lt;a href=&quot;http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013_29.html&quot; target=&quot;_blank&quot;&gt;Build Back end Structure of SharePoint and angular business layer&lt;/a&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;lato&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; letter-spacing: 0.28px; line-height: 19.6px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/8163078412060443224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013_4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/8163078412060443224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/8163078412060443224'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013_4.html' title='CRUD OPERATIONS USING SHAREPOINT 2013 RESTAPI &amp; ANGULARJS (PART2)'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmrccaahXnCXBb1_sbFmi81OEWbRMf4aO701AOV2UVw59zRkGVo2GaKrKFAfyNHC57toe0qzhN9kb4u-izPaPMgFJWIv3hGT1DNWMIa6VyGvXb22Vl7bk26UwZTJZrjzwos5RD8Ip72jSD/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-7361848838669671183</id><published>2015-12-01T22:15:00.000+02:00</published><updated>2016-01-04T18:49:08.080+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>CRUD Operations using Sharepoint 2013 RestApi &amp; Angularjs (Part1)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
On first time joined my new job and client have only one issue with SharePoint which is staff decided to never use this portal until it come more faster, so we made a long meeting and finally we decided to use powerful of SharePoint functionality and on the same time use &amp;nbsp;powerful of &amp;nbsp;client side framework like Angularjs , from first time we knew that we will face some of challenges as when we start study and make a lot of search of how to implement &lt;u&gt;Angularjs module with SharePoint RestAPI&lt;/u&gt; we have not a lot of references talk about it ,most of developers use knockout as client side with SharePoint so we need to take care while design our project in case that anytime we face some issues can&#39;t implemented with Angular we can use alternative way to do it even by CSOM &quot;Client Side Object Model&quot; and finally we made full designed structure you can use if you think to try use SharePoint and Angularjs.&lt;br /&gt;
&lt;br /&gt;
I know it&#39;s long introduction but i have to explain to you what&#39;s reason that forced us to follow this strategy. And now it&#39;s time to begin ,for me the best way to learn something is to have full demo and here we are, this blog will divide into 3 parts;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;u&gt;&lt;b&gt;Build Angularjs Structure.&lt;/b&gt;&lt;/u&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;Build Back end Structure of SharePoint and angular business layer&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;Build generic UI project as front end interface for our demo.&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
now lets explain our demo will be like that :&lt;/div&gt;
&lt;div&gt;
i&#39;m an employee in company and need to request vacation so i will log into sharepoint with my account and fill form then send vacation request , i need to see process flow where it located now or who is responsible for take an action for my task now, in other side if i&#39;m employee who has this task now i need to respond on this task.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That&#39;s it so simple example we will start step by step on this demo to cover all business process.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
And here we go, stay tuned for &lt;a href=&quot;http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013_4.html&quot; target=&quot;_blank&quot;&gt;Part2&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/7361848838669671183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/7361848838669671183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/7361848838669671183'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2015/12/crud-operations-using-sharepoint-2013.html' title='CRUD Operations using Sharepoint 2013 RestApi &amp; Angularjs (Part1)'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-2559175793523562540</id><published>2014-03-16T15:09:00.000+02:00</published><updated>2015-11-30T19:40:12.171+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="export"/><category scheme="http://www.blogger.com/atom/ns#" term="list view webpart"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="webpart"/><category scheme="http://www.blogger.com/atom/ns#" term="xslt"/><title type='text'>Exporting the XSLT List View Web Part in SharePoint 2010</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;tr_bq&quot; style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&amp;nbsp;you can’t export a XSL list view web part.&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;a href=&quot;http://www.glynblogs.com/wp-content/uploads/2011/04/XLV-Web-Part-No-Export-Option.png&quot; rel=&quot;lightbox[515]&quot; style=&quot;color: #23694b; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img alt=&quot;XLV Web Part With No Export Option&quot; class=&quot;alignnone size-full wp-image-517&quot; src=&quot;http://www.glynblogs.com/wp-content/uploads/2011/04/XLV-Web-Part-No-Export-Option.png&quot; height=&quot;84&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); margin: 5px 0px; padding: 5px;&quot; title=&quot;XLV Web Part No Export Option&quot; width=&quot;152&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
As you can see in the above screenshot the ability to export an XLV has been disabled by default – but that is something that you can pretty easily turn back on. Admittedly at some point here SPD has was used for the following technique – but once it’s been used (i.e. once only by me) there’s no reason that you’ll ever need it to use it again once you have the following few lines of mark-up (i.e. you don’t need it!).&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
So, my approach involved opening up a page with an XLV in SPD and saving the web part file locally. I then simply edited the resulting file in notepad until it looked like the below code:&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;color: #3d85c6; font-family: verdana, arial, sans-serif; font-size: small; line-height: 22.100000381469727px;&quot;&gt;&amp;lt;webParts&amp;gt;&lt;/b&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;webPart xmlns=&quot;http://schemas.microsoft.com/WebPart/v3&quot;&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;metaData&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;type name=&quot;Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot; /&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;importErrorMessage&amp;gt;Cannot import this Web Part.&amp;lt;/importErrorMessage&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/metaData&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;data&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;properties&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&amp;lt;property name=&quot;ListUrl&quot; type=&quot;string&quot;&amp;gt;Lists/CustomList&amp;lt;/property&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;&amp;lt;property name=&quot;ExportMode&quot; type=&quot;exportmode&quot;&amp;gt;All&amp;lt;/property&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;lt;/properties&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&amp;lt;/data&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;lt;/webPart&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 22.100000381469727px;&quot;&gt;&lt;b&gt;&amp;lt;/webParts&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
With this code I can carry out the following steps to give me an XLV that can be exported:&lt;/div&gt;
&lt;ol style=&quot;margin-bottom: 10px; margin-top: 10px; padding-bottom: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px;&quot;&gt;Modify the ListUrl property to the site relative url of my list&lt;br /&gt;E.g. note here that in my example it is&amp;nbsp;&lt;em&gt;lists/customlist&lt;/em&gt;&amp;nbsp;not&amp;nbsp;&lt;em&gt;/subsite/lists/customlist&lt;/em&gt;&lt;/li&gt;
&lt;li style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px;&quot;&gt;Save the file locally with an appropriate filename and the extension .webpart&lt;/li&gt;
&lt;li style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px;&quot;&gt;Edit a page on the same site* as the list and upload this web part&lt;/li&gt;
&lt;div style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;a href=&quot;http://www.glynblogs.com/wp-content/uploads/2011/04/Upload-Web-Part.png&quot; rel=&quot;lightbox[515]&quot; style=&quot;color: #23694b; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img alt=&quot;Upload A Web Part&quot; class=&quot;alignnone size-full wp-image-516&quot; src=&quot;http://www.glynblogs.com/wp-content/uploads/2011/04/Upload-Web-Part.png&quot; height=&quot;242&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); margin: 5px 0px; padding: 5px;&quot; title=&quot;Upload Web Part&quot; width=&quot;232&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
4.&amp;nbsp;Add the web part to the page – and note the option to export is now available!&lt;/div&gt;
&lt;/ol&gt;
&lt;ol style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 0px; padding-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
&lt;a href=&quot;http://www.glynblogs.com/wp-content/uploads/2011/04/XLV-Web-Part-With-Export-Option.png&quot; rel=&quot;lightbox[515]&quot; style=&quot;color: #23694b; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img alt=&quot;XLV Web Part With Export Option&quot; class=&quot;alignnone size-full wp-image-518&quot; src=&quot;http://www.glynblogs.com/wp-content/uploads/2011/04/XLV-Web-Part-With-Export-Option.png&quot; height=&quot;216&quot; style=&quot;background-color: #f3f3f3; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); margin: 5px 0px; padding: 5px;&quot; title=&quot;XLV Web Part With Export Option&quot; width=&quot;564&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
5. You should now be able to edit this web part just like any other XLV, e.g. modifying the view etc.&lt;/div&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 22.100000381469727px; margin-bottom: 1em; margin-top: 1em; padding: 0px;&quot;&gt;
Now that we have the ability to export an XLV it is the first step in opening up some of those great features that are available in SPD for those situations where it’s simply not possible to use SPD itself.&amp;nbsp;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;arial&amp;quot; , sans-serif; font-size: 13px; line-height: 22.100000381469727px;&quot;&gt;*As a final thought, this works for an XLV on the same site as the list you want to show – but what about if you wanted to show a list from a different site? Well, I think in this case you could replace the ListUrl property with the ListId and the WebId properties and that may work for you. When I get a moment I’ll confirm this.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/2559175793523562540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/exporting-xslt-list-view-web-part-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/2559175793523562540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/2559175793523562540'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/exporting-xslt-list-view-web-part-in.html' title='Exporting the XSLT List View Web Part in SharePoint 2010'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-4963501060914003863</id><published>2014-03-16T14:59:00.005+02:00</published><updated>2015-11-30T19:40:35.286+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="breadcrumb"/><category scheme="http://www.blogger.com/atom/ns#" term="document library"/><category scheme="http://www.blogger.com/atom/ns#" term="folders"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="subfolders"/><title type='text'>SharePoint 2010 Breadcrumb not showing sub folders in document library</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
SharePoint 2010 Breadcrumb not working sub folders in document library&lt;br /&gt;
&lt;br /&gt;
Solution&lt;br /&gt;
1. &amp;nbsp; &amp;nbsp; &amp;nbsp;Open site in SharePoint designer 2010&lt;br /&gt;
2. &amp;nbsp; &amp;nbsp; &amp;nbsp;Open “All Files” à Select Document Library from the list à Forms à AllItems.aspx&lt;br /&gt;
3. &amp;nbsp; &amp;nbsp; &amp;nbsp;Open &amp;nbsp;“AllItems.aspx” in SharePoint Designer ( select code view )&lt;br /&gt;
4. &amp;nbsp; &amp;nbsp; &amp;nbsp;Find out &amp;nbsp;“&amp;lt;asp:Content ContentPlaceHolderId=&quot;PlaceHolderPageTitleInTitleArea&quot; runat=&quot;server&quot;&amp;gt;”&lt;br /&gt;
5. &amp;nbsp; &amp;nbsp; &amp;nbsp;Change the code&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot; &amp;lt;SharePoint:ListProperty Property=&quot;Title&quot; runat=&quot;server&quot;/&amp;gt; &quot;&lt;br /&gt;
To &lt;br /&gt;
&lt;br /&gt;
&amp;lt;SharePoint:ListProperty Property=&quot;TitleBreadcrumb&quot; runat=&quot;server&quot;/&amp;gt;&lt;br /&gt;
&amp;lt;SharePoint:UIVersionedContent UIVersion=&quot;4&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;
&amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;
&amp;lt;span class=&quot;ms-ltviewselectormenuheader&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;
&amp;lt;SharePoint:ListTitleViewSelectorMenu AlignToParent=&quot;true&quot; id=&quot;LTViewSelectorMenu&quot; runat=&quot;server&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;
&amp;lt;/SharePoint:UIVersionedContent&amp;gt;&lt;br /&gt;
&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;
6. &amp;nbsp; &amp;nbsp; &amp;nbsp;Save the file&lt;br /&gt;
7. &amp;nbsp; &amp;nbsp; &amp;nbsp;Refresh the SharePoint page&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/4963501060914003863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/sharepoint-2010-breadcrumb-not-showing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4963501060914003863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4963501060914003863'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/sharepoint-2010-breadcrumb-not-showing.html' title='SharePoint 2010 Breadcrumb not showing sub folders in document library'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-8473395960974833168</id><published>2014-03-16T14:56:00.002+02:00</published><updated>2015-11-30T19:40:47.998+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="contentType"/><category scheme="http://www.blogger.com/atom/ns#" term="custom pagelayout"/><category scheme="http://www.blogger.com/atom/ns#" term="page layout"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>Creating a custom Page Layout based on ContentType in SharePoint 2010</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Creating a custom Page Layout in SharePoint 2010 is not too
different than creating a custom Page Layout in SharePoint 2007. However, the
process of creating a SharePoint Solution Package has changed in Visual Studio
2010. This article will walk you through the steps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;First, open Visual Studio and create&amp;nbsp;a new C# project,
using the &quot;Empty SharePoint Project&quot; template, listed under the
SharePoint 2010 project templates. For this example, we&#39;ll name our project
&quot;MyCustomPageLayout&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf6-DahuTIMiSHD9qGnM76Y6tnNT2UkYtQ0gq48nmgPdMeUJfplQYE0oOVSYr_No4mOf7HrFsKiIIVkly3k276nbJejBUPE8LniRsZ5jXSdsNz1QmHG0nXY8FwzeZ3dLhELMwXVedaeMaO/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;385&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf6-DahuTIMiSHD9qGnM76Y6tnNT2UkYtQ0gq48nmgPdMeUJfplQYE0oOVSYr_No4mOf7HrFsKiIIVkly3k276nbJejBUPE8LniRsZ5jXSdsNz1QmHG0nXY8FwzeZ3dLhELMwXVedaeMaO/s1600/1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;For this example, we&#39;ll be deploying our solution as a &lt;/span&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;Farm
solution&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBYMDganqWRQOHkoa1NVkpiT6etNXzCoWp4SVX0BiNtuJyiiiHSuqgvcP0fS-fTWNPS08bmeyZgvSpoYyGtybeWxDugv8_iEbgMoK2goRWG1YetEjjY2zImwzJsH_vpqk56EJax1WG8knw/s1600/2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;510&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBYMDganqWRQOHkoa1NVkpiT6etNXzCoWp4SVX0BiNtuJyiiiHSuqgvcP0fS-fTWNPS08bmeyZgvSpoYyGtybeWxDugv8_iEbgMoK2goRWG1YetEjjY2zImwzJsH_vpqk56EJax1WG8knw/s1600/2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Click &quot;Finish&quot; to wire up your solution to your
particular SharePoint site.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;background: white; line-height: 18.0pt; margin-top: 0in; vertical-align: baseline;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;border: 1pt none windowtext; font-family: &amp;quot;georgia&amp;quot; , serif; font-weight: normal; padding: 0in;&quot;&gt;Content Type&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , serif; font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .25in; margin-left: 0in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;First thing to do is to
define a content type.&lt;br /&gt;
I will call my Content Type: PicturePageContentType&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-50EY76meX0hyphenhyphenAEcHY_cCUBqZKNd_jtlfLYFJb4BPPyU3Ob6B12rJBc1bmYzjv0H9ASOOOwSacM5SfzrSX2L3GgicqZbDBPMJydXH-Q0W4CVAGo9_6-J5ZNKmEjRcudeju-pfaUfmy8cS/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-50EY76meX0hyphenhyphenAEcHY_cCUBqZKNd_jtlfLYFJb4BPPyU3Ob6B12rJBc1bmYzjv0H9ASOOOwSacM5SfzrSX2L3GgicqZbDBPMJydXH-Q0W4CVAGo9_6-J5ZNKmEjRcudeju-pfaUfmy8cS/s1600/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;To
do this:&lt;br /&gt;
- Go to: Site Settings –&amp;gt; Site content types&lt;br /&gt;
- Next, click Create&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkFTUKWKfxCrMmc0-nSQHPOaAxwmF6sywgyA9VHfGTqCgT_hqDFlgVFcu7DUp0IVVNetbn9cnRtaKZPcSejU0RaVIJaeMXp3oC40p2QNMjzfMRN6lmcATxGkhy_lfUO9S3uEfZUG8qHemt/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkFTUKWKfxCrMmc0-nSQHPOaAxwmF6sywgyA9VHfGTqCgT_hqDFlgVFcu7DUp0IVVNetbn9cnRtaKZPcSejU0RaVIJaeMXp3oC40p2QNMjzfMRN6lmcATxGkhy_lfUO9S3uEfZUG8qHemt/s1600/4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;In
the following screen you insert information about the content type.&lt;br /&gt;
An import thing to do is let it inherit from the right parent content type.&lt;br /&gt;
This needs to be from the group: Publishing Content Types and the parent needs
to be Page.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKIMdAgq3GY5-0inF3hSsaLDG7QQwaKWdQyoz0C6tDAqBtxiU5beYml7q5bHLK-I9-WLBlfJeZQb7QCiilXCk0oEj4CFxI0WPBzPOYTt0IA8oJCqd1qtjVsWMzFQBDMGGCRdGDGuH8ZE5_/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKIMdAgq3GY5-0inF3hSsaLDG7QQwaKWdQyoz0C6tDAqBtxiU5beYml7q5bHLK-I9-WLBlfJeZQb7QCiilXCk0oEj4CFxI0WPBzPOYTt0IA8oJCqd1qtjVsWMzFQBDMGGCRdGDGuH8ZE5_/s1600/5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;So
far nothing special, next I added some non existing columns.&lt;br /&gt;
On the following page click Add from new site column.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht02vhK8JkxHEmd4vCQpxub9KCAhLLFYuuz6DRZeCDsUnGb7T39XkeQjVNSLxB3pMN4ziAQ5qs_xlcv_v6j232DI6Y0-S-LF0VgH8YSxeH_Vfdj-j2Ci_xfBoPKFcw8f1W-WeZcOYpgIO7/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht02vhK8JkxHEmd4vCQpxub9KCAhLLFYuuz6DRZeCDsUnGb7T39XkeQjVNSLxB3pMN4ziAQ5qs_xlcv_v6j232DI6Y0-S-LF0VgH8YSxeH_Vfdj-j2Ci_xfBoPKFcw8f1W-WeZcOYpgIO7/s1600/6.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;Define
in the screen the follows up the columns that you would like to add to the your
content type (Page Layout in the end).&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;After
you added all the columns you needed you can overview it when you’re looking at
you content type. You’ll see that I added &lt;/span&gt;&lt;span style=&quot;color: #92d050; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;Page Content&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;, this was one from the already existing site columns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;background-position: initial initial; background-repeat: initial initial; color: #92d050; font-family: &amp;quot;calibri&amp;quot; , sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;background-position: initial initial; background-repeat: initial initial; color: #92d050; font-family: &amp;quot;calibri&amp;quot; , sans-serif;&quot;&gt;&amp;lt;Field ID=&quot;{7169882F-9B0C-4EA8-A096-9822C720D3BB}&quot;
Name=&quot;PageContent&quot; DisplayName=&quot;PageContent&quot;
Type=&quot;HTML&quot; RichText=&quot;TRUE&quot;
RichTextMode=&quot;FullHtml&quot; /&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #92d050; font-family: &amp;quot;calibri&amp;quot; , &amp;quot;sans-serif&amp;quot;; mso-bidi-font-family: Calibri;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;background-position: initial initial; background-repeat: initial initial;&quot;&gt;&amp;nbsp; &amp;lt;Field
ID=&quot;{ECD16AAB-CEA3-4D0A-9F48-16F59B29C73A}&quot;
Name=&quot;PageImage&quot; DisplayName=&quot;PageImage&quot;
Type=&quot;Image&quot; RichText=&quot;true&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;border: none windowtext 1.0pt; color: #743399; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;; mso-border-alt: none windowtext 0in; mso-no-proof: yes; padding: 0in;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEkUBt6UJxytIsepiw8fHr7tRqZ2fZAZALNaGIu5To1Rrp2afpeFlz1qJhTKg-CTHBRv7wvxSSUG1s2GS7za9qpRtmOfNxGhDaiCQaNx3Gw0UwvixSfRYxHIbSfYMC7nJIVUNGSXqQhFsu/s1600/7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;361&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEkUBt6UJxytIsepiw8fHr7tRqZ2fZAZALNaGIu5To1Rrp2afpeFlz1qJhTKg-CTHBRv7wvxSSUG1s2GS7za9qpRtmOfNxGhDaiCQaNx3Gw0UwvixSfRYxHIbSfYMC7nJIVUNGSXqQhFsu/s1600/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: none windowtext 1.0pt; color: #743399; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;; mso-border-alt: none windowtext 0in; mso-no-proof: yes; padding: 0in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; border-bottom: double windowtext 2.25pt; border: none; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;&quot;&gt;
&lt;div style=&quot;background-position: initial initial; background-repeat: initial initial; border: none; line-height: 18pt; margin: 0in 0in 0.25in; padding: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;serif&amp;quot;;&quot;&gt;Note:
If you added a from column to your page you cannot delete it:) If you want to
get rid of it you need to delete the whole content type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;background: white; line-height: 18.0pt; margin-top: 0in; vertical-align: baseline;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;border: 1pt none windowtext; font-family: &amp;quot;georgia&amp;quot; , serif; font-weight: normal; padding: 0in;&quot;&gt;Create the Page Layout&lt;/span&gt;&lt;/u&gt;&lt;span style=&quot;font-family: &amp;quot;georgia&amp;quot; , serif; font-weight: normal;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;As with SharePoint 2007, we&#39;ll need to provision our Page
Layouts to our SharePoint Site Collection Master Page Gallery by using a
&quot;Module&quot; element. To do this, right click on the Project and say you
want to add a new item. Select &quot;Module&quot; from the list of SharePoint
2010 items.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcdXgUtBYfTF4QJE6ELmIz2G-eM0Elnv4bCN0b1Wx5JrvD1744GqvCFg1geXKPiqJyfDhfBLB5XJSbYnBMzDOteY09o6YFkj1krqSbjrirc7HK4nwmQKyNByF_M6GKfnDy_aMrifZDPwzp/s1600/8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;386&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcdXgUtBYfTF4QJE6ELmIz2G-eM0Elnv4bCN0b1Wx5JrvD1744GqvCFg1geXKPiqJyfDhfBLB5XJSbYnBMzDOteY09o6YFkj1krqSbjrirc7HK4nwmQKyNByF_M6GKfnDy_aMrifZDPwzp/s1600/8.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;We&#39;ll name the Module &quot;masterpage&quot;. When you create
the new module, you&#39;ll see something like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOnAjkkIfwJadtaj0vIxFXASe78PDHxkCZfSEk1F9QdpH4FTkHgbIK2HOQm66Z5UGXfDUi_SgGEvXmjN94Ns-0Fdd52RpsWMEGEYrdliBGekYla-8qAgd2QhMJlsZNgncnzxvI6-IsYiJz/s1600/9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOnAjkkIfwJadtaj0vIxFXASe78PDHxkCZfSEk1F9QdpH4FTkHgbIK2HOQm66Z5UGXfDUi_SgGEvXmjN94Ns-0Fdd52RpsWMEGEYrdliBGekYla-8qAgd2QhMJlsZNgncnzxvI6-IsYiJz/s1600/9.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;By default, the module contains a sample text file you, so you
can see how the Module deploys a file to SharePoint. However, we don&#39;t need it,
so we&#39;ll delete Sample.txt. Next, we need to wire up our module to point to the
URL of the Master Page Gallery, so we&#39;ll add a &quot;Url&quot;&amp;nbsp;attribute
to the Module node. Our Elements.xml file should now contain this XML:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;lt;?xml
version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;Elements xmlns=&quot;&lt;/span&gt;&lt;a href=&quot;http://schemas.microsoft.com/sharepoint/&quot;&gt;&lt;span style=&quot;color: #3c29d4; font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;http://schemas.microsoft.com/sharepoint/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;Module Name=&quot;masterpage&quot;
Url=&quot;_catalogs/masterpage&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/Module&amp;gt;&lt;br /&gt;
&amp;lt;/Elements&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Next, we&#39;re going to drop our new Page Layout file into the
Module. To do this, we&#39;ll right-click on the &quot;masterpage&quot; module in
the Visual Studio explorer and select &quot;Add new item&quot;.&amp;nbsp;We&#39;re once
again presented with the &quot;Add New Item&quot; dialog. If&amp;nbsp;we were to
select &quot;Application Page&quot; from the SharePoint 2010 menu, we&#39;d get a
code-behind page in addition to our ASPX page, which we&amp;nbsp;don&#39;t want. Since
all&amp;nbsp;we want to provision is markup (and not code), we&#39;re going to use a
shortcut. Select the &quot;General&quot; node and select &quot;Text File&quot;
from the list of items. However, name the file
&quot;MyCustomPageLayout.aspx&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4VRbglav6_-nj-TUz9-rcYqB8KOMdmiAi1dOQtUquOr64vZjuuFE2h7NYFvqQEJ2pS-_WhK8hI6N_QlgNcc03R5FR5P48OFY0Af1q2rOQ49ZIewNJmmheiO51yFuheVfvi8H2dyeNZ2D4/s1600/10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;386&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4VRbglav6_-nj-TUz9-rcYqB8KOMdmiAi1dOQtUquOr64vZjuuFE2h7NYFvqQEJ2pS-_WhK8hI6N_QlgNcc03R5FR5P48OFY0Af1q2rOQ49ZIewNJmmheiO51yFuheVfvi8H2dyeNZ2D4/s1600/10.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Add your Page Layout markup into your MyCustomPageLayout.aspx
page. You can do it how I do it, which is to create a new Page Layout in &lt;/span&gt;&lt;span style=&quot;color: #00b050; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;SharePoint
designer,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;Now, we need to add the code for
PageLayout1.aspx.&amp;nbsp; It&#39;s easier to design for the page first in SharePoint
designer and then cop the code over.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;So let&#39;s open SharePoint designer
to the site you are developing on.&amp;nbsp; Select &quot;Page Layouts&quot; under
Site Objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxeW51jMeIobKUtE54rvKsUskxfEfLaowYAphKXk0NHR7t6MKPYKycrtiIuU6J8lhzGKcjwzJQlNyL_0cWtp57hUzMVW9BVaoCnQwKaBIGrRSlhABcm9QAH4zKVosyIjTuWhjgnjd4NPpq/s1600/11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxeW51jMeIobKUtE54rvKsUskxfEfLaowYAphKXk0NHR7t6MKPYKycrtiIuU6J8lhzGKcjwzJQlNyL_0cWtp57hUzMVW9BVaoCnQwKaBIGrRSlhABcm9QAH4zKVosyIjTuWhjgnjd4NPpq/s1600/11.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;In the ribbon click &quot;New Page
Layout&quot;.&amp;nbsp; In the dialog box select Custom Content Types and
ContentType1.&amp;nbsp; Enter a URL Name and Title&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRGT3HDYtE83hfLNLN3vRbs5XyLbMTuf6Kvkb7wD9RxanHUKEB3VW1C2JI8xwh9k1nxpcRbFkjKteDuE_qRTp8WnL3pnDTqZMR1UlJJ08xLGqnvKsF9UzZ4k0aSe48Iiag-xTGWv4IS3wH/s1600/12.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRGT3HDYtE83hfLNLN3vRbs5XyLbMTuf6Kvkb7wD9RxanHUKEB3VW1C2JI8xwh9k1nxpcRbFkjKteDuE_qRTp8WnL3pnDTqZMR1UlJJ08xLGqnvKsF9UzZ4k0aSe48Iiag-xTGWv4IS3wH/s1600/12.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;In the Toolbox, under
SharePointControls, Server Controls, Content Fields you should see PageContent
and PageImage.&amp;nbsp; Drag these two fields onto the page in the
&quot;PlaceHolderMain&quot; content area so it looks like this&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBrW30fUSY-BFS9VQ0a6MsIfc4muA_-bwAvzyes-FogFJsQqaNrsbaq-saU5pgDeXBu71bD05pgg3obn2WFIqmmZ1RULNrw6Pxg29aAs98hkkISa0dEDBlxTW1ztgEoiSiY5t_F6qM5zE/s1600/13.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;422&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBrW30fUSY-BFS9VQ0a6MsIfc4muA_-bwAvzyes-FogFJsQqaNrsbaq-saU5pgDeXBu71bD05pgg3obn2WFIqmmZ1RULNrw6Pxg29aAs98hkkISa0dEDBlxTW1ztgEoiSiY5t_F6qM5zE/s1600/13.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;Once again, the FieldName values
most likely won&#39;t match yours since that&#39;s a guid generated by the
system.&amp;nbsp; We will make two changes before we copy the code over to our
project.&amp;nbsp; Instead of leaving the guid for the field names we will change
the FieldName to the actual names of the fields -- PageContent and PageImage so
the code will be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN&quot; style=&quot;color: #00b050; font-size: 12.0pt; mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&amp;lt;PublishingWebControls:RichImageField
FieldName=&quot;PageImage&quot;
runat=&quot;server&quot;&amp;gt;&amp;lt;/PublishingWebControls:RichImageField&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial;&quot;&gt;
&lt;span lang=&quot;EN&quot; style=&quot;color: #00b050; font-size: 12.0pt; mso-ansi-language: EN; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;b&gt;&amp;lt;PublishingWebControls:RichHtmlField
FieldName=&quot;PageContent&quot;
runat=&quot;server&quot;&amp;gt;&amp;lt;/PublishingWebControls:RichHtmlField&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;This makes it easier when
deploying&amp;nbsp;the solution&amp;nbsp;to dev, staging, and production since the
FieldName guids rarely match when moving to a different SharePoint 2010
environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;Also, in the Page directive at the
top of the page get rid of the following text: meta:webpartpageexpansion=&quot;full&quot;
meta:progid=&quot;SharePoint.WebPartPage.Document&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.5pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #00b050; font-size: 11.5pt; mso-ascii-font-family: Calibri; mso-bidi-font-family: Calibri; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-hansi-font-family: Calibri;&quot;&gt;Take the code from the
DesignPageLayout and copy it over to the PageLayout1.aspx page in your
project.&amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;then copying the code to
Visual Studio. However, DO NOT FORGET to remove the attributes in the Page
Directive at the top of the page that SharePoint Designer adds, that look like
this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;meta:webpartpageexpansion=&quot;full&quot;
meta:progid=&quot;SharePoint.WebPartPage.Document&quot;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;If you don&#39;t forget to remove those items from the Page
directive, SharePoint will think your pages have been customized, even though
they were deployed via a Feature.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Next, we&#39;ll need to update the Module&#39;s Elements.xml file to
tell SharePoint what to do with the new Page Layout.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The first thing we&#39;ll need to do is to update the
&quot;Url&quot; property of the File element, by removing the
&quot;masterpage/&quot; prefix fromt the Url. (Since we already specified in
the Module element that we&#39;re deploying the Page Layout to the
&quot;masterpages&quot; library, if we left the &quot;masterpages/&quot; part
of the Url on the file, SharePoint would try to provision our Page Layout into
a library called &quot;masterpages&quot;&amp;nbsp;&lt;i&gt;inside&lt;/i&gt;&amp;nbsp;the existing
&quot;masterpages&quot; library! We don&#39;t want that!) Your new File element
should look like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&amp;lt;File
Path=&quot;masterpage\MyCustomPageLayout.aspx&quot;
Url=&quot;MyCustomPageLayout.aspx&quot; /&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Now we need to specify some properties for the Page Layout.
These properties are identical to the kind of properties you would specify for
a Page Layout in SharePoint 2007:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; color: #4c4c4c; line-height: 13.6pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The&amp;nbsp;&lt;b&gt;Title&amp;nbsp;&lt;/b&gt;of
     the file in SharePoint&lt;br /&gt;
     In our case, the file itself has a&amp;nbsp;URL of MyCustomPageLayout.aspx,
     but we can also give the page a Title that will show up when the Page
     Layout is being selected by the content author, such as &quot;My Custom
     Page Layout&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; color: #4c4c4c; line-height: 13.6pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The&amp;nbsp;&lt;b&gt;Content
     Type&lt;/b&gt;&lt;br /&gt;
     All Page Layouts must inherit from the &quot;Page Layout&quot; content
     type (which we add using a Resource file value.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; color: #4c4c4c; line-height: 13.6pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A&amp;nbsp;&lt;b&gt;Publishing
     Preview Image&lt;br /&gt;
     &lt;/b&gt;The Publishing Preview Image is the image that shows up when a user
     picks that Page Layout from the Page Layout picker while&amp;nbsp;they&#39;re
     creating a new page. In this example, we&#39;ll just point to the Article
     Page&#39;s preview image.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;background: white; color: #4c4c4c; line-height: 13.6pt; mso-list: l0 level1 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list .5in;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The&amp;nbsp;&lt;b&gt;Publishing
     Associated Content Type&lt;/b&gt;&lt;br /&gt;
     This is the Content Type that the Page Layout is representing, such as an
     &quot;Article Page&quot;, &quot;Welcome Page&quot;, etc. The value is a
     string representing a Lookup value that&#39;s a combination of the name of the
     Content Type and its unique identifier.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: 12.0pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;color: #4c4c4c; font-size: 8.5pt;&quot;&gt;Our new File node will look like this:&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&amp;lt;File
Path=&quot;masterpage\MyCustomPageLayout.aspx&quot;
Url=&quot;MyCustomPageLayout.aspx&quot; Type=&quot;GhostableInLibrary&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name=&quot;Title&quot;
Value=&quot;My Custom Page Layout&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name=&quot;ContentType&quot;
Value=&quot;$Resources:cmscore,contenttype_pagelayout_name;&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property
Name=&quot;PublishingPreviewImage&quot;
Value=&quot;~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/CustomPageLayout.png,
~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/CustomPageLayout.png&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property
Name=&quot;PublishingAssociatedContentType&quot; Value=&quot;;#ContentTypeName;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#&quot;&lt;br /&gt;
/&amp;gt;&lt;br /&gt;
&amp;lt;/File&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: 12.0pt;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 7.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Please note, there&#39;s no line break inside the
PublishingAssociatedContentType value string; I needed to add a line break so
you could see the whole value here&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;.&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: 12.0pt;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;That&#39;s it! We&#39;ve built our Module.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: 12.0pt;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Now, we&#39;re going to add a module for the Page Layout preview
image. Right click on the project and add an additional Module element. Delete
the &quot;Sample.txt&quot; file from it, and add your new preview image. (In
our case, we&#39;ll call it CustomPageLayout.png&quot;.) Modify your module file so
it looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;;&quot;&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;b&gt;&amp;lt;Module Name=&quot;Previews Images&quot;
Url=&quot;_catalogs/masterpage/$Resources:core,Culture;/Preview
Images&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;File Path=&quot;Preview Images\CustomPageLayout.png&quot;
Url=&quot;CustomPageLayout.png&quot; Type=&quot;GhostableInLibrary&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name=&quot;Title&quot;
Value=&quot;Custom Page Layout&amp;nbsp;Preview Image&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/File&amp;gt;&lt;br /&gt;
&amp;lt;/Module&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;You might have noticed that a new Feature got created for you
when you created a new Module. Let&#39;s rename the Feature itself
MyCustomPageLayout in the project tree, like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMM_IVVbbeqlK88BJ-r5SlnH-wyHvgWk-dl_OVABEcE_K6yFpkimgnmx1wsnNzbZMem1WOq0WC5lclAznByn8SvA_8OGrX3mlaAVGUvcHqdbJy6WTXQ4-SRA6BMCp0-VYDEYqb0mJqsw8m/s1600/14.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMM_IVVbbeqlK88BJ-r5SlnH-wyHvgWk-dl_OVABEcE_K6yFpkimgnmx1wsnNzbZMem1WOq0WC5lclAznByn8SvA_8OGrX3mlaAVGUvcHqdbJy6WTXQ4-SRA6BMCp0-VYDEYqb0mJqsw8m/s1600/14.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;We&#39;ll open up our&amp;nbsp;MyCustomPageLayout feature, and give it a
helpful name and description. Notice that you can graphically see that your
Module is a part of this Feature, and you can even see which Module files will
be provisioned when the Feature is activated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7mBOQFY44N-JZOneNBdeBtf8Dgk2K54qwbP9iAxrciimsnO9K955b3HojIqC93AXHHTDBxhVZ63LfJ5_1yPBKqh5fmx0Y4LFFLXIC4X8EV3QFdFDtVhXlh1MxpXcN1JZWGW4Yep0N-s4m/s1600/15.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7mBOQFY44N-JZOneNBdeBtf8Dgk2K54qwbP9iAxrciimsnO9K955b3HojIqC93AXHHTDBxhVZ63LfJ5_1yPBKqh5fmx0Y4LFFLXIC4X8EV3QFdFDtVhXlh1MxpXcN1JZWGW4Yep0N-s4m/s1600/15.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The last thing we need to do is to make sure our Solution
Package is getting configured correctly, to include our new Feature.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;By default, the &quot;Empty SharePoint Project&quot; will create
a DLL for you. If we just&amp;nbsp;went ahead and deployed&amp;nbsp;our Solution
Package with the settings as-is, we would be deploying a DLL to the GAC.
However, since our solution doesn&#39;t have any code in it, it would be a blank
DLL. That&#39;s a bit messy, so let&#39;s avoid that. Click on the Project in your
Solution Explorer, and look in the Properties Window. Change the &quot;Include
Assembly in Package&quot; property to &quot;False&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg1D5K42KjEbjXiN8W4cpA9rS6RoOSmKsx13dVi49pGKMvi9M2mBMnKfsbt_pXpEx76WIC7zBUaax93Ysfh4aN9Yolq-GSEtxFd2GdeFUu-4Ko8P5TezTqufLwQGyoC1DUhg1teX1mZRTf/s1600/16.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg1D5K42KjEbjXiN8W4cpA9rS6RoOSmKsx13dVi49pGKMvi9M2mBMnKfsbt_pXpEx76WIC7zBUaax93Ysfh4aN9Yolq-GSEtxFd2GdeFUu-4Ko8P5TezTqufLwQGyoC1DUhg1teX1mZRTf/s1600/16.jpg&quot; width=&quot;243&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Important note: This value is in the Properties&amp;nbsp;&lt;i&gt;Window&lt;/i&gt;.
I was originally looking for it in the Properties page of the Project (say that
three times fast), and I couldn&#39;t find it there.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;To deploy our new Solution Package to our Sandboxed Site,
we&#39;ll&amp;nbsp;go to&amp;nbsp;the &quot;Build&quot; menu in Visual Studio, and select
&quot;Deploy MyCustomPageLayout&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgydnCtIOgmWkn8c4cinYYSdSfWlj6hNuLtojZ2iISmXxXa6KwGcjCU9eYBi5L1nkR1VObQjxS1fwENt2OogMKzLri_i_hD11Iie0ulmTAaNWBQt70A6kLG10NIHB1DDzLA0o-flTYw48YF/s1600/17.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgydnCtIOgmWkn8c4cinYYSdSfWlj6hNuLtojZ2iISmXxXa6KwGcjCU9eYBi5L1nkR1VObQjxS1fwENt2OogMKzLri_i_hD11Iie0ulmTAaNWBQt70A6kLG10NIHB1DDzLA0o-flTYw48YF/s1600/17.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;This will assemble the Solution Package, deploy the Solution
Package to the Sandbox, then activate the Sandboxed feature.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;If we browse to our Master Page Library,&amp;nbsp;we&#39;ll now see our
new Page Layout. Note that, unlike SharePoint 2007, our Page Layout will appear
checked out by default, if&amp;nbsp;we haven&#39;t modified any of the approval or
check-out settings of the out of the Master Page Gallery. We&#39;ll need to check
it in and approve it for it to be available to us.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Refrences:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Links :&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://rburgundy.wordpress.com/2010/05/21/sharepoint-2010-create-page-layout-based-on-a-custom-content-type-in-visual-studio-2010/&quot;&gt;http://rburgundy.wordpress.com/2010/05/21/sharepoint-2010-create-page-layout-based-on-a-custom-content-type-in-visual-studio-2010/&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://www.rkinteractive.com/blogs/SoftwareDevelopment/post/2012/01/06/Creating-Custom-Content-Types-and-Page-Layouts-in-Visual-Studio-2010.aspx&quot;&gt;http://www.rkinteractive.com/blogs/SoftwareDevelopment/post/2012/01/06/Creating-Custom-Content-Types-and-Page-Layouts-in-Visual-Studio-2010.aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;http://www.c-sharpcorner.com/Forums/Thread/182458/how-to-create-page-layout-in-sharepoint-2010-using-visual-st.aspx&quot;&gt;http://www.c-sharpcorner.com/Forums/Thread/182458/how-to-create-page-layout-in-sharepoint-2010-using-visual-st.aspx&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/8473395960974833168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/creating-custom-page-layout-based-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/8473395960974833168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/8473395960974833168'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/creating-custom-page-layout-based-on.html' title='Creating a custom Page Layout based on ContentType in SharePoint 2010'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjf6-DahuTIMiSHD9qGnM76Y6tnNT2UkYtQ0gq48nmgPdMeUJfplQYE0oOVSYr_No4mOf7HrFsKiIIVkly3k276nbJejBUPE8LniRsZ5jXSdsNz1QmHG0nXY8FwzeZ3dLhELMwXVedaeMaO/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-2991265253009000144</id><published>2014-03-16T14:37:00.001+02:00</published><updated>2015-11-30T19:41:23.311+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commonIssues"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="page directive"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="tags"/><title type='text'>Error on start &amp; end tag Page Directive ..SharePoint2010</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
if you face problem on tag page directive all what you need to do is&lt;b&gt; &lt;span style=&quot;color: #38761d;&quot;&gt;Close &amp;amp; Open File&lt;/span&gt; &lt;/b&gt;:) , simple right ! :D&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/2991265253009000144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/error-on-start-end-tag-page-directive.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/2991265253009000144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/2991265253009000144'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/error-on-start-end-tag-page-directive.html' title='Error on start &amp; end tag Page Directive ..SharePoint2010'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-2185532962863342630</id><published>2014-03-16T14:35:00.000+02:00</published><updated>2015-11-30T19:41:40.690+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commonIssues"/><category scheme="http://www.blogger.com/atom/ns#" term="control template"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="taxonomypicker"/><title type='text'>Fix for &#39;Load control template .. TaxonomyPicker.ascx&quot;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
if &amp;nbsp;you face problem in TexonomyPicker.ascx , please follow link below have solution :&lt;br /&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-left: 1.0in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;color: #92d050; font-family: &amp;quot;courier new&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;&quot;&gt;o&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://gallery.technet.microsoft.com/office/32d06697-ab7f-447e-9d0e-b6d93bee3fda&quot;&gt;http://gallery.technet.microsoft.com/office/32d06697-ab7f-447e-9d0e-b6d93bee3fda&lt;/a&gt;&lt;span style=&quot;color: #92d050;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/2185532962863342630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/fix-for-load-control-template.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/2185532962863342630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/2185532962863342630'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/fix-for-load-control-template.html' title='Fix for &#39;Load control template .. TaxonomyPicker.ascx&quot;'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-5308963195520763244</id><published>2014-03-16T14:33:00.006+02:00</published><updated>2015-11-30T19:41:55.090+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commonIssues"/><category scheme="http://www.blogger.com/atom/ns#" term="deployment step"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="retract solution"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="spusercodev4"/><title type='text'>Error occurred in deployment step &#39;Retract Solution&#39;: Cannot start service SPUserCodeV4 on computer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; line-height: 17.25pt; margin-left: 0.75in; text-align: left; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 12pt;&quot;&gt;&lt;span style=&quot;color: #92d050;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: 7pt; line-height: normal;&quot;&gt;&lt;span style=&quot;color: #92d050;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 12pt;&quot;&gt;When i got this error
i searched in net and found a solution to enable Microsoft Sharepoint
foundation User Code Service in services section of Central Administration.
Unfortunately i couldnt find a service with that name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; line-height: 17.25pt; margin-left: 0.75in; text-align: left; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 12pt;&quot;&gt;-&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: 7pt; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica&amp;quot; , sans-serif; font-size: 12pt;&quot;&gt;While searching in
&lt;span style=&quot;color: red;&quot;&gt;services.msc&lt;/span&gt; i&amp;nbsp;found that&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;SharePoint 2010 User Code Host&lt;/span&gt;&amp;nbsp;&lt;/b&gt;was
not started.&amp;nbsp;Once&amp;nbsp;the Service was started &amp;nbsp;the issue got
resolved.&lt;span style=&quot;color: #92d050;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/5308963195520763244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/error-occurred-in-deployment-step.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/5308963195520763244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/5308963195520763244'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/error-occurred-in-deployment-step.html' title='Error occurred in deployment step &#39;Retract Solution&#39;: Cannot start service SPUserCodeV4 on computer'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-7643068518604856454</id><published>2014-03-09T13:22:00.002+02:00</published><updated>2015-11-30T19:42:09.237+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="document library"/><category scheme="http://www.blogger.com/atom/ns#" term="download document"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>Download Document on click in Document Library</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Default behavior in SharePoint is to open display view form on click to an item on document library , if you need to download document item instead of view it we need to have workaround .&lt;br /&gt;
&lt;br /&gt;
in this example we only download documents with extensions &quot;.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf&quot;&lt;br /&gt;
&lt;br /&gt;
Follow steps below to change behavior to download document :&lt;br /&gt;
- &amp;nbsp;open document library and add content query web-part .&lt;br /&gt;
- Edit web-part as HTML.&lt;br /&gt;
- add the following code :&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
$(function () {&amp;nbsp;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
var extensions = &quot;.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf&quot;;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; $(&quot;.srch-Title3 a&quot;).each(function () {&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var hrefDoc = $(this).attr(&#39;href&#39;);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fileExt = hrefDoc.substring(hrefDoc.lastIndexOf(&#39;.&#39;), hrefDoc.length);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (extensions.toString().toLowerCase().indexOf(fileExt) != -1) {&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.href = &#39;/_layouts/download.aspx?SourceURL=&#39; + this.href;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; });&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; $(&quot;a[onclick*=&#39;DispEx&#39;]&quot;).each(function (data) {&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fileExtIndex = this.toString().lastIndexOf(&#39;.&#39;);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fileExt = this.toString().substr(fileExtIndex);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var index = extensions.toString().indexOf(fileExt);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (extensions.toString().toLowerCase().indexOf(fileExt) != -1) {&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var href = this.href;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.href = &#39;/_layouts/download.aspx?SourceURL=&#39; + this.href;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;a[onclick*=&#39;DispEx&#39;]&quot;).removeAttr(&#39;onclick&#39;);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;a&quot;).removeAttr(&#39;onmousedown&#39;);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; });&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; $(&quot;a[onclick*=&#39;DispDocItemExWithServerRedirect&#39;]&quot;).each(function (data) {&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fileExtIndex = this.toString().lastIndexOf(&#39;.&#39;);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fileExt = this.toString().substr(fileExtIndex);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var index = extensions.toString().indexOf(fileExt);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (extensions.toString().toLowerCase().indexOf(fileExt) != -1) {&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var href = this.href;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.href = &#39;/_layouts/download.aspx?SourceURL=&#39; + this.href;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;$(&quot;a[onclick*=&#39;DispDocItemExWithServerRedirect&#39;]&quot;).removeAttr(&#39;onclick&#39;);&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;a&quot;).removeAttr(&#39;onmousedown&#39;); &amp;nbsp; &amp;nbsp;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/7643068518604856454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/download-document-on-click-in-document.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/7643068518604856454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/7643068518604856454'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2014/03/download-document-on-click-in-document.html' title='Download Document on click in Document Library'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-4204642080601519731</id><published>2013-06-08T21:16:00.000+02:00</published><updated>2015-11-30T19:42:22.817+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="content types"/><category scheme="http://www.blogger.com/atom/ns#" term="custom pagelayout"/><category scheme="http://www.blogger.com/atom/ns#" term="modules"/><category scheme="http://www.blogger.com/atom/ns#" term="publishing pages"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint design"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint lists"/><title type='text'>Creating a custom Page Layout in SharePoint 2010</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Creating a custom Page Layout in SharePoint 2010 is not too different than creating a custom Page Layout in SharePoint 2007. However, the process of creating a SharePoint Solution Package has changed in Visual Studio 2010. This article will walk you through the steps.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;First, open Visual Studio and create a new C# project, using the &quot;Empty SharePoint Project&quot; template, listed under the SharePoint 2010 project templates. For this example, we&#39;ll name our project &quot;&lt;span style=&quot;color: #38761d;&quot;&gt;MyCustomPageLayout&quot;&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMPRvOwoE-amnqE0rD0hOcvZzfhNvOvbOfopnDgUwTn0IgW39GD6WdgOCoipmMGYN_al82mDlbfB_Wmf8ugcumfH1Ng4HZhxL7MgYWwZT4Qq72xJqoN7uIeCE_dlCr9ZkvVm2mWA-2scBM/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMPRvOwoE-amnqE0rD0hOcvZzfhNvOvbOfopnDgUwTn0IgW39GD6WdgOCoipmMGYN_al82mDlbfB_Wmf8ugcumfH1Ng4HZhxL7MgYWwZT4Qq72xJqoN7uIeCE_dlCr9ZkvVm2mWA-2scBM/s1600/1.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&amp;nbsp;For this example, we&#39;ll be deploying our solution as a &quot;&lt;span style=&quot;color: #38761d;&quot;&gt;Farm solution&lt;/span&gt;&quot;.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisXsVG6wZu88uWAt0pRysVzyGDug7B4KX8B8ASXfAD9mH1irdB79TK1c696nu7XMtWn9LRNhA5fnPf6wdAjqAn6eK4FH2-W7vE7umhYFAegrER2eTryo2vLs_Z-cN1WeY417rqPiq97_mv/s1600/2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;510&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisXsVG6wZu88uWAt0pRysVzyGDug7B4KX8B8ASXfAD9mH1irdB79TK1c696nu7XMtWn9LRNhA5fnPf6wdAjqAn6eK4FH2-W7vE7umhYFAegrER2eTryo2vLs_Z-cN1WeY417rqPiq97_mv/s1600/2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;Click &quot;Finish&quot; to wire up your solution to your particular SharePoint site.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&amp;nbsp;Content Type:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;First thing to do is to define a content type.&lt;br /&gt;
I will call my Content Type: &lt;span style=&quot;color: #38761d;&quot;&gt;PicturePageContentType&lt;/span&gt;
To do this:
-&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;- Go to: Site Settings –&amp;gt; Site content types&lt;br /&gt;
&amp;nbsp;- Next, click Create&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipvjmn4Jqs44Rtiqe3llnpyA9l-4dduFGBQny8Ob-sLeMmOhEuVIA7WgBdsz4-bRBWEH3y-ods4yaQ57pULWL7TdWEaITzvlbMBUr-oD9inTwVQJBj6sDMjkNnmFeZCjTrVkj_39WvSCP5/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipvjmn4Jqs44Rtiqe3llnpyA9l-4dduFGBQny8Ob-sLeMmOhEuVIA7WgBdsz4-bRBWEH3y-ods4yaQ57pULWL7TdWEaITzvlbMBUr-oD9inTwVQJBj6sDMjkNnmFeZCjTrVkj_39WvSCP5/s1600/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;In the following screen you insert information about the content type.&lt;br /&gt;
An import thing to do is let it inherit from the right parent content type.&lt;br /&gt;
This needs to be from the group: Publishing Content Types and the parent needs to be Page.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTER2KaAYSoCiKd8t-widCdNmqlPI0mWymsKeUJ-1oocX63yIbOJ6X12GCB7agOaAZk0Ml-9XbblUgmB4A4TDd5Gurmj7qQesZJwUONgD2_VewhlPobzd3JmW_Rl3_KXgMIj1OKkLPXRxD/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTER2KaAYSoCiKd8t-widCdNmqlPI0mWymsKeUJ-1oocX63yIbOJ6X12GCB7agOaAZk0Ml-9XbblUgmB4A4TDd5Gurmj7qQesZJwUONgD2_VewhlPobzd3JmW_Rl3_KXgMIj1OKkLPXRxD/s1600/4.png&quot; width=&quot;543&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;So far nothing special, next I added some non existing columns.&lt;br /&gt;
On the following page click Add from new site column.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC_gNheILvyzKbbcqRgcqw6grUQT6u6jMeg87STVqhkgqXsXdqSz8oRNLvh3PPetPEDisc2iBDv4oxxDlV3PpHvzOS2OEvnPiXxDCSPIPJLKqZq06Rc2_QDkm3-ZYuMKXCkGVRCZHTad9l/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;205&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC_gNheILvyzKbbcqRgcqw6grUQT6u6jMeg87STVqhkgqXsXdqSz8oRNLvh3PPetPEDisc2iBDv4oxxDlV3PpHvzOS2OEvnPiXxDCSPIPJLKqZq06Rc2_QDkm3-ZYuMKXCkGVRCZHTad9l/s1600/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Define in the screen the follows up the columns that you would like to add to the your content type (Page Layout in the end).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiUoXS-2Hz079KpecE898QxIlJLLepaCVe_E6SXrp1vlVEZYd2Yi_elpzZqfZ2QgcteX9BixLbiaYblWiYzzNhz9ymZCbHCg6KUae1vDsFktJi20AJSoB_2yELzXuWRR9ycsWk-OaDy7-4/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiUoXS-2Hz079KpecE898QxIlJLLepaCVe_E6SXrp1vlVEZYd2Yi_elpzZqfZ2QgcteX9BixLbiaYblWiYzzNhz9ymZCbHCg6KUae1vDsFktJi20AJSoB_2yELzXuWRR9ycsWk-OaDy7-4/s1600/6.png&quot; width=&quot;401&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;After you added all the columns you needed you can overview it when you’re looking at you content type. You’ll see that I added &lt;span style=&quot;color: #38761d;&quot;&gt;Page Content&lt;/span&gt;, this was one from the already existing site columns.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif;&quot;&gt;&amp;lt;Field
ID=&quot;{7169882F-9B0C-4EA8-A096-9822C720D3BB}&quot;
Name=&quot;PageContent&quot; DisplayName=&quot;PageContent&quot;
Type=&quot;HTML&quot; RichText=&quot;TRUE&quot;
RichTextMode=&quot;FullHtml&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;calibri&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-position: initial initial; background-repeat: initial initial;&quot;&gt;&amp;nbsp; &amp;lt;Field
ID=&quot;{ECD16AAB-CEA3-4D0A-9F48-16F59B29C73A}&quot;
Name=&quot;PageImage&quot; DisplayName=&quot;PageImage&quot;
Type=&quot;Image&quot; RichText=&quot;true&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2XjvZrG3VyxSqvjunq6FwiXH7_-sg33DWexQoduiWkNFx4tnd6ESJeOEHGwX2lYIYS_I-fJP5BpXg-bpb0mdccn0SucWScsoRjr7ZyWTSx0R3UyYt-9MBS6ueOOfeoaFnqSaFUt9nt0dd/s1600/7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;362&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2XjvZrG3VyxSqvjunq6FwiXH7_-sg33DWexQoduiWkNFx4tnd6ESJeOEHGwX2lYIYS_I-fJP5BpXg-bpb0mdccn0SucWScsoRjr7ZyWTSx0R3UyYt-9MBS6ueOOfeoaFnqSaFUt9nt0dd/s1600/7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background: white; line-height: 18.0pt; margin-bottom: .0001pt; margin: 0in; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;color: #92d050; font-family: &amp;quot;calibri&amp;quot; , &amp;quot;sans-serif&amp;quot;;&quot;&gt;&lt;span style=&quot;background-position: initial initial; background-repeat: initial initial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&amp;nbsp;
 &lt;field displayname=&quot;PageContent&quot; id=&quot;{7169882F-9B0C-4EA8-A096-9822C720D3BB}&quot; name=&quot;PageContent&quot; richtext=&quot;TRUE&quot; richtextmode=&quot;FullHtml&quot; type=&quot;HTML&quot;&gt;&lt;field displayname=&quot;PageImage&quot; id=&quot;{ECD16AAB-CEA3-4D0A-9F48-16F59B29C73A}&quot; name=&quot;PageImage&quot; richtext=&quot;true&quot; type=&quot;Image&quot;&gt;Note: If you added a from column to your page you cannot delete it:) If you want to get rid of it you need to delete the whole content type.&amp;nbsp;&lt;/field&gt;&lt;/field&gt;&lt;br /&gt;
&lt;field displayname=&quot;PageContent&quot; name=&quot;PageContent&quot; richtext=&quot;TRUE&quot; richtextmode=&quot;FullHtml&quot; type=&quot;HTML&quot;&gt;&lt;field displayname=&quot;PageImage&quot; name=&quot;PageImage&quot; richtext=&quot;true&quot; type=&quot;Image&quot;&gt;&lt;br /&gt;&lt;/field&gt;&lt;/field&gt;
&lt;u&gt;&lt;b&gt;Create the Page Layout&amp;nbsp;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
As with SharePoint 2007, we&#39;ll need to provision our Page Layouts to our SharePoint Site Collection Master Page Gallery by using a &quot;Module&quot; element. To do this, right click on the Project and say you want to add a new item. Select &quot;Module&quot; from the list of SharePoint 2010 items.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjIsrahY6eSr7NKSldstAEgZi8Zc7u9J4tSE_Z5T0NKx60rgGFDezU_ihDjqH401L_sw5bsTgDeNtELYeaAFxDIggvYAPKBUKxSmwkkaKi5t4RBnP01b6kKZHy6abL6evGQV3eq89kttYd/s1600/8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;386&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjIsrahY6eSr7NKSldstAEgZi8Zc7u9J4tSE_Z5T0NKx60rgGFDezU_ihDjqH401L_sw5bsTgDeNtELYeaAFxDIggvYAPKBUKxSmwkkaKi5t4RBnP01b6kKZHy6abL6evGQV3eq89kttYd/s1600/8.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
We&#39;ll name the Module &quot;&lt;span style=&quot;color: #38761d;&quot;&gt;masterpage&lt;/span&gt;&quot;. When you create the new module, you&#39;ll see something like this:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdKR_3hWwaPVaXa9uFhYvLWhXrenIcOS5ixfv0of4Uws3GStUjTvNOfOLGy3U1JVayPQCe4hLCT1B3my-W1_GfH_a9h8_SNkNqSy1EzOILy8JehlfUZFak8JNxtxGgrzf1yIbJ-M-APYIa/s1600/9.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdKR_3hWwaPVaXa9uFhYvLWhXrenIcOS5ixfv0of4Uws3GStUjTvNOfOLGy3U1JVayPQCe4hLCT1B3my-W1_GfH_a9h8_SNkNqSy1EzOILy8JehlfUZFak8JNxtxGgrzf1yIbJ-M-APYIa/s1600/9.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;By default, the module contains a sample text file you, so you can see how the Module deploys a file to SharePoint. However, we don&#39;t need it, so we&#39;ll delete Sample.txt. Next, we need to wire up our module to point to the URL of the Master Page Gallery, so we&#39;ll add a &quot;Url&quot; attribute to the Module node. Our Elements.xml file should now contain this XML:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;&amp;lt;?xml
version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;
&amp;lt;Elements xmlns=&quot;&lt;/span&gt;&lt;a href=&quot;http://schemas.microsoft.com/sharepoint/&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;http://schemas.microsoft.com/sharepoint/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;Module Name=&quot;masterpage&quot;
Url=&quot;_catalogs/masterpage&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/Module&amp;gt;&lt;br /&gt;
&amp;lt;/Elements&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;
&amp;nbsp; &amp;lt;Module Name=&quot;masterpage&quot;
Url=&quot;_catalogs/masterpage&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;
&amp;nbsp; &amp;lt;/Module&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;
&amp;lt;/Elements&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Next, we&#39;re going to dop our new Page Layout file into the Module. To do thhis, we&#39;ll right-click on the &quot;masterpage&quot; module in the Visual Studio explorer and select &quot;Add new item&quot;. We&#39;re once again presented with the &quot;Add New Item&quot; dialog. If we were to select &quot;Application Page&quot; from the SharePoint 2010 menu, we&#39;d get a code-behind page in addition to our ASPX page, which we don&#39;t want. Since all we want to provision is markup (and not code), we&#39;re going to use a shortcut. Select the &quot;General&quot; node and select &quot;Text File&quot; from the list of items. However, name the file &quot;MyCustomPageLayout.aspx&quot;.
 
 
 
Add your Page Layout markup into your MyCustomPageLayout.aspx page.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgena4O8evYxJcZkxG0z02IzXn2ZZWCcGpebGtN9EjKI6xL-yZDVWyfltZX8plCQ3-F66c6A9HtdHbOQB3sFJw-99XWt_RL74S_d-1pit5d7nU7wSK8Iv7gSyLK9M3p93A4u4EvMETY4ndh/s1600/10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;386&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgena4O8evYxJcZkxG0z02IzXn2ZZWCcGpebGtN9EjKI6xL-yZDVWyfltZX8plCQ3-F66c6A9HtdHbOQB3sFJw-99XWt_RL74S_d-1pit5d7nU7wSK8Iv7gSyLK9M3p93A4u4EvMETY4ndh/s1600/10.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
You can do it how I do it, which is to create a new Page Layout in SharePoint designer,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Now, we need to add the code for PageLayout1.aspx.  It&#39;s easier to design for the page first in SharePoint designer and then cop the code over.&lt;br /&gt;
So let&#39;s open SharePoint designer to the site you are developing on.  Select &quot;Page Layouts&quot; under Site Objects.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2NACRmEzSuEP6Kcw4ayItziFhEl6SGKyqccvddsbfj9HuRnYSBZStRmyXYH78aT57gEoEerDjKTOHgYI3IZT1BqvWlrFTgt1Y4hRE4LGM8YODgSoW24MmgF6Zhe5mbO08KUbJRIhZbrON/s1600/11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;298&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2NACRmEzSuEP6Kcw4ayItziFhEl6SGKyqccvddsbfj9HuRnYSBZStRmyXYH78aT57gEoEerDjKTOHgYI3IZT1BqvWlrFTgt1Y4hRE4LGM8YODgSoW24MmgF6Zhe5mbO08KUbJRIhZbrON/s1600/11.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;In the ribbon click &quot;New Page Layout&quot;.  In the dialog box select Custom Content Types and ContentType1.  Enter a URL Name and Title&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiPfmlli88t4HDbYwsCYNPTcI53l0lKHMcIGrzZdbIaySCaN2KXofgSKw_LAtW26vmz6-bHvfeNh3f2V-I2QEBn5lJFLOhRszSeboK15mpczNBOBmZ3O6J3XdoBxzY_oRq56DlRS0M75-M/s1600/12.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;530&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiPfmlli88t4HDbYwsCYNPTcI53l0lKHMcIGrzZdbIaySCaN2KXofgSKw_LAtW26vmz6-bHvfeNh3f2V-I2QEBn5lJFLOhRszSeboK15mpczNBOBmZ3O6J3XdoBxzY_oRq56DlRS0M75-M/s1600/12.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;In the Toolbox, under SharePointControls, Server Controls, Content Fields you should see PageContent and PageImage.  Drag these two fields onto the page in the &quot;PlaceHolderMain&quot; content area so it looks like this
 
Once again,&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU3DyQCBjttdsYs0subxssUAYI6XmWHUjHUVyMf3le6wIqNDymbHYELlmZ2noHUbKdaUieFlHK2a5c4KSuq4eSEq0t7IxPhRfr7TlqjZeoIKjct3HwCkR_x0dPdP7-kQ3I8U6mJ5MsOfew/s1600/13.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;422&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU3DyQCBjttdsYs0subxssUAYI6XmWHUjHUVyMf3le6wIqNDymbHYELlmZ2noHUbKdaUieFlHK2a5c4KSuq4eSEq0t7IxPhRfr7TlqjZeoIKjct3HwCkR_x0dPdP7-kQ3I8U6mJ5MsOfew/s1600/13.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;the FieldName values most likely won&#39;t match yours since that&#39;s a guid generated by the system.  We will make two changes before we copy the code over to our project.  Instead of leaving the guid for the field names we will change the FieldName to the actual names of the fields -- PageContent and PageImage so the code will be&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN&quot; style=&quot;font-size: 12pt;&quot;&gt;&amp;lt;PublishingWebControls:RichImageField
FieldName=&quot;PageImage&quot;
runat=&quot;server&quot;&amp;gt;&amp;lt;/PublishingWebControls:RichImageField&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span lang=&quot;EN&quot; style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;PublishingWebControls:RichHtmlField
FieldName=&quot;PageContent&quot;
runat=&quot;server&quot;&amp;gt;&amp;lt;/PublishingWebControls:RichHtmlField&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;publishingwebcontrols:richimagefield fieldname=&quot;PageImage&quot; runat=&quot;server&quot;&gt;&lt;/publishingwebcontrols:richimagefield&gt;
&lt;publishingwebcontrols:richhtmlfield fieldname=&quot;PageContent&quot; runat=&quot;server&quot;&gt;&lt;/publishingwebcontrols:richhtmlfield&gt;
This makes it easier when deploying the solution to dev, staging, and production since the FieldName guids rarely match when moving to a different SharePoint 2010 environment.&lt;br /&gt;
&lt;br /&gt;
Also, in the Page directive at the top of the page get rid of the following text: &lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;meta:webpartpageexpansion=&quot;full&quot; meta:progid=&quot;SharePoint.WebPartPage.Document&quot;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Take the code from the DesignPageLayout and copy it over to the PageLayout1.aspx page in your project.&lt;br /&gt;
&lt;br /&gt;
then copying the code to Visual Studio. However, DO NOT FORGET to remove the attributes in the Page Directive at the top of the page that SharePoint Designer adds, that look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif; font-size: 8.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt; line-height: 13.6pt;&quot;&gt;meta:webpartpageexpansion=&quot;full&quot;
meta:progid=&quot;SharePoint.WebPartPage.Document&quot;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
If you don&#39;t forget to remove those items from the Page directive, SharePoint will think your pages have been customized, even though they were deployed via a Feature.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Next, we&#39;ll need to update the Module&#39;s Elements.xml file to tell SharePoint what to do with the new Page Layout.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;The first thing we&#39;ll need to do is to update the &quot;Url&quot; property of the File element, by removing the &quot;masterpage/&quot; prefix fromt the Url. (Since we already specified in the Module element that we&#39;re deploying the Page Layout to the &quot;masterpages&quot; library, if we left the &quot;masterpages/&quot; part of the Url on the file, SharePoint would try to provision our Page Layout into a library called &quot;masterpages&quot; inside the existing &quot;masterpages&quot; library! We don&#39;t want that!) Your new File element should look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;lt;File
Path=&quot;masterpage\MyCustomPageLayout.aspx&quot;
Url=&quot;MyCustomPageLayout.aspx&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;verdana&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 8.5pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&amp;nbsp; 
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;Now we need to specify some properties for the Page Layout. These properties are identical to the kind of properties you would specify for a Page Layout in SharePoint 2007:&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;• The &lt;b&gt;Title&lt;/b&gt; of the file in SharePoint
In our case, the file itself has a URL of MyCustomPageLayout.aspx, but we can also give the page a Title that will show up when the Page Layout is being selected by the content author, such as &quot;My Custom Page Layout&quot;.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;• The &lt;b&gt;Content Type&lt;/b&gt;
All Page Layouts must inherit from the &quot;Page Layout&quot; content type (which we add using a Resource file value.)&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;• A &lt;b&gt;Publishing Preview&lt;/b&gt; Image
The Publishing Preview Image is the image that shows up when a user picks that Page Layout from the Page Layout picker while they&#39;re creating a new page. In this example, we&#39;ll just point to the Article Page&#39;s preview image.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;• The &lt;b&gt;Publishing Associated Content Type&lt;/b&gt;
This is the Content Type that the Page Layout is representing, such as an &quot;Article Page&quot;, &quot;Welcome Page&quot;, etc. The value is a string representing a Lookup value that&#39;s a combination of the name of the Content Type and its unique identifier.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;Our new File node will look like this:&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;/file&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 10pt;&quot;&gt;&amp;lt;File
Path=&quot;masterpage\MyCustomPageLayout.aspx&quot;
Url=&quot;MyCustomPageLayout.aspx&quot; Type=&quot;GhostableInLibrary&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 10pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name=&quot;Title&quot;
Value=&quot;My Custom Page Layout&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 10pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name=&quot;ContentType&quot;
Value=&quot;$Resources:cmscore,contenttype_pagelayout_name;&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 10pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property
Name=&quot;PublishingPreviewImage&quot;
Value=&quot;~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/CustomPageLayout.png,
~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview
Images/CustomPageLayout.png&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 10pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property
Name=&quot;PublishingAssociatedContentType&quot; Value=&quot;;#ContentTypeName;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 7pt;&quot;&gt;#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#&quot;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 7pt;&quot;&gt;
/&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 7pt;&quot;&gt;
&amp;lt;/File&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; type=&quot;GhostableInLibrary&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;property name=&quot;Title&quot; value=&quot;My Custom Page Layout&quot;&gt;&lt;property name=&quot;ContentType&quot; value=&quot;$Resources:cmscore,contenttype_pagelayout_name;&quot;&gt;&lt;property name=&quot;PublishingPreviewImage&quot; value=&quot;~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/CustomPageLayout.png, ~SiteCollection/_catalogs/masterpage/$Resources:core,Culture;/Preview Images/CustomPageLayout.png&quot;&gt;&lt;property name=&quot;PublishingAssociatedContentType&quot; value=&quot;;#ContentTypeName;
#0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C526CD44D;#&quot;&gt;&lt;/property&gt;&lt;/property&gt;&lt;/property&gt;&lt;/property&gt;&lt;/file&gt;Please note, there&#39;s no line break inside the PublishingAssociatedContentType value string; I needed to add a line break so you could see the whole value here.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;That&#39;s it! We&#39;ve built our Module.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;Now, we&#39;re going to add a module for the Page Layout preview image. Right click on the project and add an additional Module element. Delete the &quot;Sample.txt&quot; file from it, and add your new preview image. (In our case, we&#39;ll call it CustomPageLayout.png&quot;.) Modify your module file so it looks like this:&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;/file&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: white; line-height: 13.6pt; margin-bottom: 12.0pt;&quot;&gt;
&lt;span style=&quot;color: #4c4c4c; font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;&amp;lt;Module Name=&quot;Previews Images&quot;
Url=&quot;_catalogs/masterpage/$Resources:core,Culture;/Preview
Images&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;File Path=&quot;Preview Images\CustomPageLayout.png&quot;
Url=&quot;CustomPageLayout.png&quot; Type=&quot;GhostableInLibrary&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name=&quot;Title&quot;
Value=&quot;Custom Page Layout&amp;nbsp;Preview Image&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/File&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot;; font-size: 8.5pt;&quot;&gt;
&amp;lt;/Module&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;module name=&quot;Previews Images&quot; url=&quot;_catalogs/masterpage/$Resources:core,Culture;/Preview Images&quot;&gt;&lt;file path=&quot;Preview Images\CustomPageLayout.png&quot; type=&quot;GhostableInLibrary&quot; url=&quot;CustomPageLayout.png&quot;&gt;&lt;property name=&quot;Title&quot; value=&quot;Custom Page Layout Preview Image&quot;&gt;&lt;/property&gt;&lt;/file&gt;&lt;/module&gt;You might have noticed that a new Feature got created for you when you created a new Module. Let&#39;s rename the Feature itself MyCustomPageLayout in the project tree, like this:&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw9T99axRIh4BYzzXP1SX-RhWCXGmI3h4GuLKitVaO-Hn7Lihy0iP6fB4pM31t_up9W3Q4-KNGPjMRJsbDoZPOvh0SykyGxX-VNJ6KnIEuW1MfpMa1oKPQ2TdkiHM17Wt64cKYYgEtBcPg/s1600/14.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;504&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw9T99axRIh4BYzzXP1SX-RhWCXGmI3h4GuLKitVaO-Hn7Lihy0iP6fB4pM31t_up9W3Q4-KNGPjMRJsbDoZPOvh0SykyGxX-VNJ6KnIEuW1MfpMa1oKPQ2TdkiHM17Wt64cKYYgEtBcPg/s1600/14.gif&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&amp;nbsp;We&#39;ll open up our MyCustomPageLayout feature, and give it a helpful name and description. Notice that you can graphically see that your Module is a part of this Feature, and you can even see which Module files will be provisioned when the Feature is activated.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxF-JkvxNiYu72gbPj-h_Lo_h2ByxhJ0tloSlVxGcyh2GBOwoXasHEMiVzW04pcsCPdQDNHHX25UwgCpRBJPb_XEquQ1Mo1WVxyKZHmUlUsvOc49Sl73R1VBEJr95mlzcfE6J8lGmpb8LY/s1600/15.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;388&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxF-JkvxNiYu72gbPj-h_Lo_h2ByxhJ0tloSlVxGcyh2GBOwoXasHEMiVzW04pcsCPdQDNHHX25UwgCpRBJPb_XEquQ1Mo1WVxyKZHmUlUsvOc49Sl73R1VBEJr95mlzcfE6J8lGmpb8LY/s1600/15.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&amp;nbsp;The last thing we need to do is to make sure our Solution Package is getting configured correctly, to include our new Feature.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&amp;nbsp;By default, the &quot;Empty SharePoint Project&quot; will create a DLL for you. If we just went ahead and deployed our Solution Package with the settings as-is, we would be deploying a DLL to the GAC. However, since our solution doesn&#39;t have any code in it, it would be a blank DLL. That&#39;s a bit messy, so let&#39;s avoid that. Click on the Project in your Solution Explorer, and look in the Properties Window. Change the &quot;Include Assembly in Package&quot; property to &quot;False&quot;.&amp;nbsp;&lt;/file&gt;&lt;br /&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKsNiCrK1VFefooG4PQTZiV06bhxDNgbaJDsiF5PkiST0nXVM8HhFUbe3urJrwHJH8oL29Zraqtc1tnOuPRpHIENocay7BSY783Ov0o1LoM1DZpN4m4kC_8e1ShyphenhypheneFdyuECBbsm7E2oXJ_/s1600/16.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKsNiCrK1VFefooG4PQTZiV06bhxDNgbaJDsiF5PkiST0nXVM8HhFUbe3urJrwHJH8oL29Zraqtc1tnOuPRpHIENocay7BSY783Ov0o1LoM1DZpN4m4kC_8e1ShyphenhypheneFdyuECBbsm7E2oXJ_/s1600/16.jpg&quot; width=&quot;390&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;file path=&quot;masterpage\MyCustomPageLayout.aspx&quot; url=&quot;MyCustomPageLayout.aspx&quot;&gt;&lt;br /&gt;&lt;/file&gt;
&amp;nbsp;Important note: This value is in the Properties Window. I was originally looking for it in the Properties page of the Project (say that three times fast), and I couldn&#39;t find it there.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;To deploy our new Solution Package to our Sandboxed Site, we&#39;ll go to the &quot;Build&quot; menu in Visual Studio, and select &quot;&lt;span style=&quot;color: #6aa84f;&quot;&gt;Deploy MyCustomPageLayout&lt;/span&gt;&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM8yyILvngSng_3cKzevJ_acoRuuP6B86q5WJV1TzB3uZmdcJVrBsJ6AQmQMpszCtXqCvVk9ZPcN5QlIoGB5QLtqCkut9bKmM1a3VRppnU3Gj8QLwOhjMUF5noN4HvV0wubELxE0LtDx3D/s1600/17.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;415&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM8yyILvngSng_3cKzevJ_acoRuuP6B86q5WJV1TzB3uZmdcJVrBsJ6AQmQMpszCtXqCvVk9ZPcN5QlIoGB5QLtqCkut9bKmM1a3VRppnU3Gj8QLwOhjMUF5noN4HvV0wubELxE0LtDx3D/s1600/17.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;This will assemble the Solution Package, deploy the Solution Package to the Sandbox, then activate the Sandboxed feature.
 
If we browse to our Master Page Library, we&#39;ll now see our new Page Layout. Note that, unlike SharePoint 2007, our Page Layout will appear checked out by default, if we haven&#39;t modified any of the approval or check-out settings of the out of the Master Page Gallery. We&#39;ll need to check it in and approve it for it to be available to us.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Refrences:
Links :&lt;br /&gt;
&lt;br /&gt;
http://rburgundy.wordpress.com/2010/05/21/sharepoint-2010-create-page-layout-based-on-a-custom-content-type-in-visual-studio-2010/
http://www.rkinteractive.com/blogs/SoftwareDevelopment/post/2012/01/06/Creating-Custom-Content-Types-and-Page-Layouts-in-Visual-Studio-2010.aspx
http://www.c-sharpcorner.com/Forums/Thread/182458/how-to-create-page-layout-in-sharepoint-2010-using-visual-st.aspx&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/4204642080601519731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/creating-custom-page-layout-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4204642080601519731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4204642080601519731'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/creating-custom-page-layout-in.html' title='Creating a custom Page Layout in SharePoint 2010'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMPRvOwoE-amnqE0rD0hOcvZzfhNvOvbOfopnDgUwTn0IgW39GD6WdgOCoipmMGYN_al82mDlbfB_Wmf8ugcumfH1Ng4HZhxL7MgYWwZT4Qq72xJqoN7uIeCE_dlCr9ZkvVm2mWA-2scBM/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-8184067504433132943</id><published>2013-06-08T20:41:00.000+02:00</published><updated>2015-11-30T19:42:42.709+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commonIssues"/><category scheme="http://www.blogger.com/atom/ns#" term="deployment step"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="retract solution"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="spusercodev4"/><title type='text'>Error occurred in deployment step &#39;Retract Solution&#39;: Cannot start service SPUserCodeV4 on computer</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
When i got this error i searched in net and found a solution to enable Microsoft Sharepoint foundation User Code Service in services section of Central Administration. Unfortunately i couldnt find a service with that name.

While searching in services.msc i found that SharePoint 2010 User Code Host was not started. Once the Service was  started  the issue got resolved.

&lt;b&gt;Fix for &#39;Load control template... TaxonomyPicker.ascx&quot;&lt;/b&gt;

 http://gallery.technet.microsoft.com/office/32d06697-ab7f-447e-9d0e-b6d93bee3fda


 Error on start &amp;amp; end tag Page Directive 
 Close &amp;amp; open File
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/8184067504433132943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/error-occurred-in-deployment-step.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/8184067504433132943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/8184067504433132943'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/error-occurred-in-deployment-step.html' title='Error occurred in deployment step &#39;Retract Solution&#39;: Cannot start service SPUserCodeV4 on computer'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-5489261018250995999</id><published>2013-06-05T19:00:00.001+02:00</published><updated>2015-11-30T19:43:08.260+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="document library"/><category scheme="http://www.blogger.com/atom/ns#" term="multiple site"/><category scheme="http://www.blogger.com/atom/ns#" term="one library"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>export one library in multiple site</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;ul style=&quot;list-style-image: initial; list-style-position: initial; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;background-color: white; border: none; color: #655f44; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;I will show how to create a custom web part that represents a list or library’s view and use this web part in other sites (at least in the same site collection) without copying documents between sites.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background-color: white; border: none; color: #655f44; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;This custom web part supports a tool bar so files can be uploaded and maintained in a single library, but viewed and maintained from any site in the site collection that has this web part.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background-color: white; border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;&lt;span style=&quot;color: #655f44; font-family: &amp;quot;arial&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;Tools needed:&lt;/span&gt;&lt;/span&gt;&lt;ul style=&quot;color: #655f44; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; list-style: disc; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;SharePoint Designer (to make one quick change, export the web part, and then optionally roll back the change)&lt;/li&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;Some way to find the site’s GUID (see link to a tool below)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif;&quot;&gt;&lt;div style=&quot;color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
First some observations:&lt;/div&gt;
&lt;ul style=&quot;color: #655f44; font-size: 13px; line-height: 18px; list-style: disc; margin: 0.5em 0px; padding: 0px 2.5em;&quot;&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;While editing a web part page, click a web part’s menu and you will usually see an Export option, except for list and library web parts.&lt;/li&gt;
&lt;li style=&quot;border: none; margin: 0px 0px 0.25em; padding: 0.25em 0px;&quot;&gt;List and library view pages are web part pages (they have “Edit Page” in the Site Actions menu&quot;) and the displayed list is a web part.&lt;/li&gt;
&lt;/ul&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;arial&amp;quot; , &amp;quot;tahoma&amp;quot; , &amp;quot;helvetica&amp;quot; , &amp;quot;freesans&amp;quot; , sans-serif;&quot;&gt;&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;strong&gt;So how can you export a list web part?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
Turns out to be pretty easy. Edit the page in SharePoint Designer and change one word.&lt;/div&gt;
&lt;ol style=&quot;background-color: white; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;li style=&quot;color: #655f44; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Open the site in SharePoint Designer and double click on a page with the web part (default.aspx, Shared Documents/Forms/Allitems.aspx, etc)&lt;/li&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #655f44;&quot;&gt;In the code view find the web part and find&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;ExportControlledProperties&amp;gt;false&amp;lt;/ExportControlledProperties&amp;gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #655f44;&quot;&gt;and change from “false” to “true”&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;color: #655f44; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Save the page (this will “unghost” the page, but you can undo the changes after the export is complete – right-click the file in the Folder List and select Reset to Site Definition)&lt;/li&gt;
&lt;li style=&quot;color: #655f44; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Go to a browser and visit this page. Go to Site Actions, Edit Page.&lt;/li&gt;
&lt;li style=&quot;color: #655f44; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Click Edit in web part you just modified and click Export.&lt;/li&gt;
&lt;li style=&quot;color: #655f44; margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Give the file a name and save it somewhere where you can find it in the next step.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
To import the exported settings as a new web part:&lt;/div&gt;
&lt;ol style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Visit your top level site in the site collection and go to Site Actions, Site Settings, and in the Galleries column click Web Parts&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
To add the web part.&lt;/div&gt;
&lt;ol style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;li style=&quot;margin: 0px 0px 0.25em; padding: 0px;&quot;&gt;Nothing special here. Add this web part just like any other web part.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;strong&gt;Some differences…&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
Oddly, the displayed columns are different. The AllItems view displayed Type, Name, Modified and Modified By. The new web part displays Type, Name and Modified By. This is easy to fix. Edit the web part and change the Selected View property to All Documents then you will get the same list of columns in both displays.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
The new web part does not display a toolbar by default, but this can be enabled from the web part’s properties panel. If the toolbar is enabled you will see all of the buttons found in the AllItems page, New, Upload, Actions and Settings (depending on the current user’s security rights).&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;strong&gt;Now test the web part in a sub site….&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
Error!&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&amp;nbsp;&lt;strong&gt;&amp;nbsp;&amp;nbsp; Unable to add selected web part(s).&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List does not exist.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The page you selected contains a list that does not exist.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
On the first attempt it appears that the new exported web part will not work on another site. Time for more research…&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;strong&gt;Find the missing GUID&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
Open the .DWP (.WEBPART in 2010) file created by the Export. Find these two lines:&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #655f44;&quot;&gt;SP 2007&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;ListName …..&amp;gt;{ list_guid_here } &amp;lt;/ListName&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;WebId ….&amp;gt; all_zeros_guid_here &amp;lt;/WebId&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
SP 2010&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #655f44;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;property name=&quot;ListName&quot; type=&quot;string&quot;&amp;gt;{ list_guid_here } &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; …&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;property name=&quot;WebId&quot; …&amp;gt;all_zeros_guid_here &amp;lt;/property&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
SharePoint uses Globally Unique IDs (GUIDS) to identify just about everything stored in the databases. Notice that the ListName has a GUID, but the WebId is all zeros. Replace the zeros with the GUID for the site that owns the list and all will then work.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;strong&gt;How to find a GUID&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
I can’t find any place in the the pages exposed in SharePoint Designer where the web site’s GUID is used, although the list’s GUID can be found in some of the URLs (for example after clicking Settings, List or Library Settings). I wrote two little utilities to display a site’s GUIDs, one a Windows application and the other a page you can deploy to the LAYOUTS folder on the server.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
See:&amp;nbsp;&lt;a href=&quot;http://techtrainingnotes.blogspot.com/2009/03/sharepoint-finding-sharepoint-guids.html&quot; style=&quot;color: blue; text-decoration: none;&quot; title=&quot;http://techtrainingnotes.blogspot.com/2009/03/sharepoint-finding-sharepoint-guids.html&quot;&gt;http://techtrainingnotes.blogspot.com/2009/03/sharepoint-finding-sharepoint-guids.html&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
Quick note: Internally a site is call a “web” and a site collection is called a “site”. (go figure…) The utilities above use the web and site names.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;strong&gt;Update the web part file&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
Edit the WebId element and replace the all zeros GUID with the site’s GUID:&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #655f44;&quot;&gt;&amp;nbsp; SP 2007”&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;WebId ….&amp;gt; all_zeros_guid_here &amp;lt;/WebId&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;span style=&quot;color: #655f44;&quot;&gt;&amp;nbsp; SP 2010&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt; &amp;lt;property name=&quot;WebId&quot; …&amp;gt;all_zeros_guid_here &amp;lt;/property&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
After updating the DWP file with the site’s (web’s) GUID, re-upload it to the web part gallery and go and test the web part in a sub site.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;br /&gt;
&lt;em&gt;&lt;strong&gt;And for the “Strange Things” list…&lt;/strong&gt;&amp;nbsp;the GUID for the web site does not include brackets ( { } ) and is in lower case. The GUID for the list must have brackets and MUST be in UPPER CASE or it will not work.&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: 13px; line-height: 18px;&quot;&gt;
&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: #f4cccc;&quot;&gt;&lt;em&gt;&lt;span style=&quot;color: #655f44; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;Reference:&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;a href=&quot;http://techtrainingnotes.blogspot.com/2009/03/sharepoint-one-library-multiple-sites.html&quot;&gt;http://techtrainingnotes.blogspot.com/2009/03/sharepoint-one-library-multiple-sites.html&lt;/a&gt;&lt;/span&gt;&lt;em style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #655f44; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #655f44; font-size: small; line-height: 18px;&quot;&gt;
&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/5489261018250995999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/export-one-library-in-multiple-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/5489261018250995999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/5489261018250995999'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/export-one-library-in-multiple-site.html' title='export one library in multiple site'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-9005859940668216866</id><published>2013-06-05T18:52:00.001+02:00</published><updated>2013-06-05T18:52:28.362+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="web"/><category scheme="http://www.blogger.com/atom/ns#" term="weburl"/><category scheme="http://www.blogger.com/atom/ns#" term="XSL"/><title type='text'>check if current web is root web or sub web in XSL</title><content type='html'>[Code]&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;lt;xsl:if test=&quot;string-length($WebUrl) = 3&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;a href=&quot;Forms/AllNews.aspx?RootFolder=/Pages/News&quot;&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;xsl:text disable-output-escaping=&quot;yes&quot;&amp;gt; &amp;lt;/xsl:text&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/xsl:if&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/9005859940668216866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/check-if-current-web-is-root-web-or-sub.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/9005859940668216866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/9005859940668216866'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/check-if-current-web-is-root-web-or-sub.html' title='check if current web is root web or sub web in XSL'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-2201244557049380919</id><published>2013-06-05T18:42:00.001+02:00</published><updated>2018-10-14T09:58:06.322+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="ErrorWebParts"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><title type='text'>All webpart appear as ErrorWebParts when using SPLimitedWebPartManager</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Hi! recently I was given a task to update properties of multiple webparts(custom developed webparts created by extending existing SharePoint OTB webparts).&lt;br /&gt;
Now the trick was to fetch those webparts across pages multiple pages and update their properties and UI formatting instructions based on a configuration file which is provided at run time on feature activation.&lt;br /&gt;
&lt;br /&gt;
Seems a simple enough task, where one needs to retreive page-url, fetch SPLimitedWebPart manager based on page-url.&lt;br /&gt;
Use SPLimitedWebPart Manager to iterate through collection of webparts which exist of specified page URL and update properties based on configuration input.&lt;br /&gt;
&lt;br /&gt;
Like any other developer, I started of write code to implement this.&lt;br /&gt;
Half-way down the line when I began to query webparts collection using SPLimitedWebPart Manger,&lt;br /&gt;
I see all webparts returned are of type &quot;ErrorWebParts&quot;.&lt;br /&gt;
&lt;br /&gt;
Why? Because of the following code is called by the specific properties of the ContentByQueryWebpart&lt;br /&gt;
&lt;br /&gt;
The webpart will always call the SPContext, there is no web-context. Therefore when initiating the&lt;br /&gt;
ContentByQueryWebpart&lt;br /&gt;
&lt;br /&gt;
A workaround for this would be to provide it with a context. all what i do adding if condition before query on&lt;br /&gt;
webparts if HttpContetxt is null i&#39;ll add it.&lt;br /&gt;
&lt;br /&gt;
[Code]&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;if (HttpContext.Current == null)&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpRequest request = new HttpRequest(&quot;&quot;, web.Url, &quot;&quot;);&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpContext.Current = new HttpContext(request, new HttpResponse(new StringWriter()));&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpContext.Current.Items[&quot;HttpHandlerSPWeb&quot;] = web;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SPFile filePath = webToUpgrade.GetFile(&quot;[ path of your page ]&quot;);&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPLimitedWebPartManager webpartManager =&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filePath.GetLimitedWebPartManager(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPLimitedWebPartCollection webPartColl = webpartManager.WebParts;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var webpart in webPartColl)&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// write your code&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/2201244557049380919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/all-webpart-appear-as-errorwebparts_5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/2201244557049380919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/2201244557049380919'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/all-webpart-appear-as-errorwebparts_5.html' title='All webpart appear as ErrorWebParts when using SPLimitedWebPartManager'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-3668031191574818652</id><published>2013-06-05T18:37:00.000+02:00</published><updated>2013-06-05T18:41:23.506+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="culture"/><category scheme="http://www.blogger.com/atom/ns#" term="language"/><category scheme="http://www.blogger.com/atom/ns#" term="publishing pages"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>check current culture language in publishing page</title><content type='html'>&lt;b&gt;check current language is&amp;nbsp;Arabic&amp;nbsp;language in publishing page&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
[Code]&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;% if (System.Threading.Thread.CurrentThread.CurrentUICulture.LCID==1025){ %&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;%}else{%&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;%}%&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/3668031191574818652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/check-current-culture-language-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/3668031191574818652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/3668031191574818652'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/check-current-culture-language-in.html' title='check current culture language in publishing page'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-1020983755430571403</id><published>2013-06-05T18:33:00.001+02:00</published><updated>2013-06-05T18:42:26.089+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Display mode"/><category scheme="http://www.blogger.com/atom/ns#" term="publishing pages"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>check Publishing page status</title><content type='html'>&lt;b&gt;if you want to check current status in publishing page is Display mode :&lt;/b&gt;&lt;br /&gt;
[Code]&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;lt;%&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;if (Microsoft.SharePoint.SPContext.Current.FormContext.FormMode == SPControlMode.Display)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; %&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;&amp;lt;asp:HyperLink runat=&quot;server&quot; Text=&quot;&amp;lt;%$ Resources: SECITN.ListdefinitionStrings, backToNewsBtn %&amp;gt;&quot; NavigateUrl=&quot;javascript:void(0);&quot; OnClick=&quot;if($(&#39;.breadcrumbNode&#39;).length == 1){ $(this).attr(&#39;href&#39;,&#39;../forms/allnews.aspx?RootFolder=/&#39; +$(&#39;.breadcrumbNode&#39;).attr(&#39;href&#39;).split(&#39;/&#39;)[1]+ &#39;/Pages/News&#39;)}else{$(this).attr(&#39;href&#39;,&#39;../forms/allnews.aspx?RootFolder=/Pages/News&#39;)}&quot;/&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;lt;%}%&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/1020983755430571403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/check-publishing-page-status.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/1020983755430571403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/1020983755430571403'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/check-publishing-page-status.html' title='check Publishing page status'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-6748014535483090385</id><published>2013-06-05T16:49:00.001+02:00</published><updated>2013-06-05T18:43:27.162+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ErrorWebParts"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="SPLimitedWebPartManager"/><category scheme="http://www.blogger.com/atom/ns#" term="webparts"/><title type='text'>All webpart appear as ErrorWebParts when using SPLimitedWebPartManager</title><content type='html'>&lt;div class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Hi! recently I was given a task to update properties of multiple webparts(custom developed webparts created by extending existing SharePoint OTB webparts).&lt;br /&gt;
Now the trick was to fetch those webparts across pages multiple pages and update their properties and UI formatting instructions based on a configuration file which is provided at run time on feature activation.&lt;br /&gt;
&lt;br /&gt;
Seems a simple enough task, where one needs to retreive page-url, fetch SPLimitedWebPart manager based on page-url.&lt;br /&gt;
Use SPLimitedWebPart Manager to iterate through collection of webparts which exist of specified page URL and update properties based on configuration input.&lt;br /&gt;
&lt;br /&gt;
Like any other developer, I started of write code to implement this.&lt;br /&gt;
Half-way down the line when I began to query webparts collection using SPLimitedWebPart Manger,&lt;br /&gt;
I see all webparts returned are of type &quot;ErrorWebParts&quot;.&lt;br /&gt;
&lt;br /&gt;
Why? Because of the following code is called by the specific properties of the ContentByQueryWebpart&lt;br /&gt;
&lt;br /&gt;
The webpart will always call the SPContext, there is no web-context. Therefore when initiating the&lt;br /&gt;
ContentByQueryWebpart&lt;br /&gt;
&lt;br /&gt;
A workaround for this would be to provide it with a context. all what i do adding if condition before query on&lt;br /&gt;
webparts if HttpContetxt is null i&#39;ll add it.&lt;br /&gt;
&lt;br /&gt;
[Code]&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;if (HttpContext.Current == null)&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpRequest request = new HttpRequest(&quot;&quot;, web.Url, &quot;&quot;);&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpContext.Current = new HttpContext(request, new HttpResponse(new StringWriter()));&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpContext.Current.Items[&quot;HttpHandlerSPWeb&quot;] = web;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt; &lt;br /&gt; &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SPFile filePath = webToUpgrade.GetFile(&quot;[ path of your page ]&quot;);&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPLimitedWebPartManager webpartManager =&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filePath.GetLimitedWebPartManager(System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared);&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPLimitedWebPartCollection webPartColl = webpartManager.WebParts;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var webpart in webPartColl)&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;// write your code&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/6748014535483090385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/all-webpart-appear-as-errorwebparts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/6748014535483090385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/6748014535483090385'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/06/all-webpart-appear-as-errorwebparts.html' title='All webpart appear as ErrorWebParts when using SPLimitedWebPartManager'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-1342949284564697239</id><published>2013-03-08T20:12:00.003+02:00</published><updated>2015-11-30T19:43:47.905+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Active deployment configuration"/><category scheme="http://www.blogger.com/atom/ns#" term="commonIssues"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="Recycle IIS Application Pool"/><title type='text'>Error occurred in deployment step &#39;Recycle IIS Application Pool&#39;</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7940224068014662697&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=7940224068014662697&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 16.0pt; margin-bottom: 6.8pt;&quot;&gt;
&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;b style=&quot;line-height: 16pt;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Problem&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 10pt; line-height: 16pt;&quot;&gt;: in a project using SharePoint 2010 and
Visual Studio 2010 during a deployment procedure we required to retract some
packages before deploy a new version, during this process visual studio
suddenly show us the next error:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 10pt; line-height: 16pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 16.0pt; margin-bottom: 6.8pt; mso-margin-top-alt: auto;&quot;&gt;
&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background: #F9F2C3; border: solid #E6D976 1.0pt; mso-border-alt: solid #E6D976 .75pt; mso-cellspacing: 1.5pt; mso-padding-alt: 6.8pt 6.8pt 6.8pt 6.8pt; mso-yfti-tbllook: 1184; width: 811px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: none; padding: 0in;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 16.0pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;div&gt;
&#39;Recycle IIS Application Pool&#39;: The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 16.0pt; margin-bottom: 6.8pt; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;﻿&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background: #F9F2C3; border: solid #E6D976 1.0pt; mso-border-alt: solid #E6D976 .75pt; mso-cellspacing: 1.5pt; mso-padding-alt: 6.8pt 6.8pt 6.8pt 6.8pt; mso-yfti-tbllook: 1184; width: 811px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: none; padding: 0in;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 16.0pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background: #F9F2C3; border: solid #E6D976 1.0pt; mso-border-alt: solid #E6D976 .75pt; mso-cellspacing: 1.5pt; mso-padding-alt: 6.8pt 6.8pt 6.8pt 6.8pt; mso-yfti-tbllook: 1184; width: 811px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border: none; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 13.0pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &amp;quot;times new roman&amp;quot; , &amp;quot;serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-no-proof: yes;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td style=&quot;border: none; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 16.0pt; margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbBYjF_9FSN60oqqEShGMXItD2tyZQ-Utnt34WF3JdxCb5h9p_41qEfwYAetkaphQhf_G6O4RPq8-EDrfGyvzeIb-DcbwLkA1YlfIopv2oKqqiuB5znRBqlqmskL_7-k-AS2yC9MvD8Aj0/s1600/ee.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;150&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbBYjF_9FSN60oqqEShGMXItD2tyZQ-Utnt34WF3JdxCb5h9p_41qEfwYAetkaphQhf_G6O4RPq8-EDrfGyvzeIb-DcbwLkA1YlfIopv2oKqqiuB5znRBqlqmskL_7-k-AS2yC9MvD8Aj0/s1600/ee.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 16.0pt; margin-bottom: .0001pt; margin-bottom: 0in; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Solution:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;arial&amp;quot; , &amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;some times the best
solution is find the most easy way, so after trying to restart IIS and try the
process again unsuccessfully, the solution is close visual studio, then open
the solution and try retract the package one more time .. yeap, believe me it
works!! :D&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/1342949284564697239/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/error-occurred-in-deployment-step.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/1342949284564697239'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/1342949284564697239'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/error-occurred-in-deployment-step.html' title='Error occurred in deployment step &#39;Recycle IIS Application Pool&#39;'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbBYjF_9FSN60oqqEShGMXItD2tyZQ-Utnt34WF3JdxCb5h9p_41qEfwYAetkaphQhf_G6O4RPq8-EDrfGyvzeIb-DcbwLkA1YlfIopv2oKqqiuB5znRBqlqmskL_7-k-AS2yC9MvD8Aj0/s72-c/ee.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-4951712171881458108</id><published>2013-03-08T20:09:00.001+02:00</published><updated>2013-06-05T18:44:27.588+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="masterpage"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="welcome page"/><title type='text'>SetMasterAndWelcomePageOn feature activates Programatically</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: 9.5pt;&quot;&gt;&lt;b&gt;[Code]&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;blockquote&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; override void FeatureActivated(SPFeatureReceiverProperties
properties)&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
SPSecurity.RunWithElevatedPrivileges(delegate&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
using (var
web = properties.Feature.Parent as SPWeb)&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (web == null) return;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
web.ValidateFormDigest();&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetMasterPage(web);&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetDefaultHomePage(web);&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
});&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception
ex)&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; finally&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static void SetDefaultHomePage(SPWeb
varoWeb)&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;try&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;varoWeb.AllowUnsafeUpdates = &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
SPFolder folder = varoWeb.RootFolder;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
folder.WelcomePage = &quot;Pages/home.aspx&quot;;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
folder.Update();&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
varoWeb.AllowUnsafeUpdates = false;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception
e)&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new SPException(&quot;Error
when trying to Set DefaultPage. Error: &quot; + e.Message);&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void
SetMasterPage(SPWeb varWeb)&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
var strMasterUrl =
&quot;/_catalogs/masterpage/myMasterPage.master&quot;;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
varWeb.AllowUnsafeUpdates = true;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
varWeb.MasterUrl = strMasterUrl;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
varWeb.CustomMasterUrl = strMasterUrl;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
varWeb.Update();&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
varWeb.AllowUnsafeUpdates = false;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception
e)&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
throw new
SPException(&quot;Error
when trying to Set MasterPage. Error: &quot; + e.Message);&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/4951712171881458108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/setmasterandwelcomepageon-feature.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4951712171881458108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4951712171881458108'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/setmasterandwelcomepageon-feature.html' title='SetMasterAndWelcomePageOn feature activates Programatically'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-4092419627978340472</id><published>2013-03-08T20:06:00.000+02:00</published><updated>2015-11-30T19:44:05.418+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DraftVersionVisibility"/><category scheme="http://www.blogger.com/atom/ns#" term="draftvivibility types"/><category scheme="http://www.blogger.com/atom/ns#" term="lists approvers"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>Set draft security visibility to document library</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
To set security that only approver and administrator see
pending files &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;Set DraftVerrsionVisibility=”2” in Schema.xml&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
To learn more about DraftVersionvisibility please read this&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.draftvisibilitytype.aspx&quot;&gt;DraftVisibility Types&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;1-&lt;span style=&quot;font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;Using xml &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;List&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;xmlns:ows&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;=&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&quot;Microsoft SharePoint&quot; EnableContentTypes=&quot;TRUE&quot; Title=&quot;Articles&quot; Direction=&quot;$Resources:Direction;&quot; Url=&quot;Lists/Articles&quot; BaseType=&quot;1&quot; xmlns=&quot;http://schemas.microsoft.com/sharepoint/&quot; ModeratedList=&quot;TRUE&quot; DraftVersionVisibility=&quot;2&quot;&lt;/b&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;2-&lt;span style=&quot;font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;Programmatically&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 0.0001pt 0.25in;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp; private void applyApproverDraftVisibilityToAllLists(SPWeb oWeb)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oWeb.AllowUnsafeUpdates = true;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPListCollectionAdapter
listAdapter = new SPListCollectionAdapter(oWeb.Lists);&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var
result = from list in
listAdapter&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select list;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach
(SPList list in
result)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list.DraftVersionVisibility = DraftVisibilityType.Approver;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oWeb.AllowUnsafeUpdates = false;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt; class SPListCollectionAdapter : List&amp;lt;SPList&amp;gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private readonly SPListCollection _listCol;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public SPListCollectionAdapter(SPListCollection listCol)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
_listCol = listCol;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Refresh();&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void
Refresh()&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Clear();&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (SPList
item in _listCol)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
Add(item);&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/4092419627978340472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/set-draft-security-visibility-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4092419627978340472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4092419627978340472'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/set-draft-security-visibility-to.html' title='Set draft security visibility to document library'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-6926502652265883610</id><published>2013-03-08T19:57:00.003+02:00</published><updated>2013-06-05T18:45:22.236+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Documentlibrary column"/><category scheme="http://www.blogger.com/atom/ns#" term="hide approver column"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>Hide approve state column from all lists</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
[Code]&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; void
hideApproveStateColumn(SPWeb oWeb)&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
oWeb.AllowUnsafeUpdates = true;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPListCollectionAdapter listAdapter = new SPListCollectionAdapter(oWeb.Lists);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var result = from
list in listAdapter&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select list;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (SPList
list in result)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
if (list.EnableModeration == true)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string ApprovalStatusColumnName = &quot;_ModerationStatus&quot;;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPView
defaultView = list.DefaultView;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
if
(defaultView.ViewFields.SchemaXml.Contains(ApprovalStatusColumnName))&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
defaultView.ViewFields.Delete(ApprovalStatusColumnName);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;defaultView.Update();&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
oWeb.AllowUnsafeUpdates = false;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/6926502652265883610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/hide-approve-state-column-from-all-lists.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/6926502652265883610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/6926502652265883610'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/hide-approve-state-column-from-all-lists.html' title='Hide approve state column from all lists'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-8642857342083578601</id><published>2013-03-08T19:56:00.001+02:00</published><updated>2013-06-05T18:45:44.337+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="programatically"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><category scheme="http://www.blogger.com/atom/ns#" term="views"/><title type='text'>create view to List programaticallly</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
[Code]&lt;br /&gt;
&lt;blockquote&gt;
&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; void
CreateView(SPWeb oWeb)&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt; &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPSecurity.RunWithElevatedPrivileges(delegate()&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string strViewName = &quot;myView&quot;;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
bool bAlreadyExists;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
SPList oList = oWeb.Lists[&quot;Pages&quot;];&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
SPViewCollection oViewCollection =
oList.Views;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
var newWeb = GetRootWeb(oWeb);&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;addContentTypeToList(oList);&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
StringCollection viewFields =
AddFieldsToView();&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
bAlreadyExists = CheckViewExist(oViewCollection);&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
if (bAlreadyExists) return;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
oViewCollection.Add(strViewName, viewFields, Query, 10, true, false);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
oWeb.Update();&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
});&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private string Query&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
string query;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
query = string.Format(@&quot; &amp;lt;Where&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;lt;Eq&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;FieldRef
Name=&#39;ContentType&#39; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;Value Type=&#39;Computed&#39;&amp;gt;{0}&amp;lt;/Value&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;/Eq&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;lt;/Where&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;lt;OrderBy&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;lt;FieldRef
Name=&#39;Created&#39; Ascending=&#39;FALSE&#39; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/OrderBy&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;, mycontentType);&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
return query;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static StringCollection AddFieldsToView()&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StringCollection viewFields= new System.Collections.Specialized.StringCollection();&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
viewFields.Add(&quot;field1&quot;);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
viewFields.Add(&quot;field2&quot;);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
viewFields.Add(&quot;field3&quot;);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
viewFields.Add(&quot;field4&quot;);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; catch (Exception
e)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
//write code when exception happen&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return viewFields;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; private static SPWeb GetRootWeb(SPWeb
oWeb)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPWeb newWeb = oWeb;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!newWeb.IsRootWeb)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
newWeb = newWeb.ParentWeb;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return newWeb;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp; private void
addContentTypeToList(SPList oList)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (oList.ContentTypes[myCTName] == null)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
oList.ContentTypes.Add(myCT);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
oList.Update();&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static bool CheckViewExist(SPViewCollection
oViewCollection)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bool
bAlreadyExists=false;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (SPView
vItem in oViewCollection)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
if (vItem.Title == &quot;myView&quot;)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
{&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
bAlreadyExists = true;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
break;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return bAlreadyExists;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/8642857342083578601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/create-view-to-list-programaticallly.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/8642857342083578601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/8642857342083578601'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/create-view-to-list-programaticallly.html' title='create view to List programaticallly'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-5861205666943891247</id><published>2013-03-08T19:26:00.000+02:00</published><updated>2018-10-14T09:59:09.340+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Discussion board"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>Create DiscussionBoard Programatically</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
[Code]&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;blockquote&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp;private void
CreateDiscussionBoardListToSite(SPWeb oWeb,string listNameEn,string
listDescEn,string listNameAr,string listDescAr)&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPList list = oWeb.Lists.TryGetList(listNameEn);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (list!=null) return;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oWeb.AllowUnsafeUpdates
= true;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Guid listId = oWeb.Lists.Add(listNameEn,
listDescEn, SPListTemplateType.DiscussionBoard);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPList createdList = oWeb.Lists[listId];&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
createdList.OnQuickLaunch = true;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
createdList.TitleResource.SetValueForUICulture(new
CultureInfo(1033), listNameEn);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
createdList.TitleResource.SetValueForUICulture(new
CultureInfo(1025), listNameAr);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
createdList.TitleResource.Update();&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
createdList.DescriptionResource.SetValueForUICulture(new CultureInfo(1033),
listDescEn);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
createdList.DescriptionResource.SetValueForUICulture(new CultureInfo(1025),
listDescAr);&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
createdList.DescriptionResource.Update();&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt; &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
createdList.Update();&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: &amp;quot;consolas&amp;quot;; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/5861205666943891247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/create-discussionboard-programatically.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/5861205666943891247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/5861205666943891247'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/create-discussionboard-programatically.html' title='Create DiscussionBoard Programatically'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7940224068014662697.post-4663962574993394564</id><published>2013-03-08T19:23:00.001+02:00</published><updated>2013-06-05T18:46:43.371+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="add web part"/><category scheme="http://www.blogger.com/atom/ns#" term="default home page"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint"/><category scheme="http://www.blogger.com/atom/ns#" term="sharepoint2010"/><title type='text'>create default home page and add webparts on sitedefinition</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;11-&lt;span style=&quot;font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;Create home.aspx page bye
adding textfile and change extension .aspx &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;22-&lt;span style=&quot;font-size: 7pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;Open home.aspx and write
magic code :&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; Page Inherits=&quot;Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c&quot;
&lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;%&amp;gt;&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; Reference
VirtualPath=&quot;~TemplatePageUrl&quot;
&lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;%&amp;gt;&lt;/span&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: yellow; font-family: Consolas; font-size: 9.5pt; mso-highlight: yellow;&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;@&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt; Reference
VirtualPath=&quot;~masterurl/default.master&quot;
&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;%&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;margin-bottom: 0.0001pt; text-indent: -0.25in;&quot;&gt;
&lt;!--[if !supportLists]--&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt; mso-fareast-font-family: Consolas;&quot;&gt;33-&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: 7pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span dir=&quot;LTR&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Open onet.xml
and add these lines &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;lt;Modules&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Module&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&quot;DefaultBlank&quot; Url=&quot;Pages&quot; Path=&quot;&quot;&amp;gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;File&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Url&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&quot;Home.aspx&quot;&amp;nbsp; Path=&quot;Home.aspx&quot; Type=&quot;GhostableInLibrary&quot;&amp;gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Property&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&quot;Title&quot; Value=&quot;Home&quot; /&amp;gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Property&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&quot;PublishingPageLayout&quot; Value=&quot;~SiteCollection/_catalogs/masterpage/HomeLayout.aspx,
Home Default Layout&quot; /&amp;gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Property&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&quot;ContentType&quot; Value=&quot;myPagesCT&quot; /&amp;gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;AllUsersWebPart&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;WebPartZoneID&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&quot;myWebpart&quot; WebPartOrder=&quot;1&quot;&amp;gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;![CDATA[&lt;/span&gt;&lt;span style=&quot;color: grey; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;br /&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Consolas; font-size: 9.5pt;&quot;&gt;&lt;b&gt;&lt;br /&gt; &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;lt;!—your
webpart code &lt;/span&gt;&lt;span style=&quot;font-family: Wingdings; font-size: 9.5pt; mso-ascii-font-family: Consolas; mso-bidi-font-family: Consolas; mso-char-type: symbol; mso-hansi-font-family: Consolas; mso-symbol-font-family: Wingdings;&quot;&gt;à&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;]]&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;lt;/&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;AllUsersWebPart&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;lt;/File&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;lt;/Module&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-size: x-small;&quot;&gt;&lt;b&gt;&amp;lt;/Modules&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: .5in;&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://asksharepoint.blogspot.com/feeds/4663962574993394564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/create-default-home-page-and-add.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4663962574993394564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7940224068014662697/posts/default/4663962574993394564'/><link rel='alternate' type='text/html' href='http://asksharepoint.blogspot.com/2013/03/create-default-home-page-and-add.html' title='create default home page and add webparts on sitedefinition'/><author><name>Mohamed Samir</name><uri>http://www.blogger.com/profile/12114127651508729451</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>