<?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-9074536009245251286</id><updated>2024-08-28T13:34:38.399+05:30</updated><category term="Management of Master Lists in SharePoint with Choice Filter Lookup column"/><category term="Master list  Consolidated Consumer List View"/><title type='text'>SharePoint Arrow (Bull&#39;s Eye)</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>96</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-8432800214275025075</id><published>2012-03-31T07:25:00.000+05:30</published><updated>2012-03-31T07:25:04.359+05:30</updated><title type='text'>Best Practices: Common Coding Issues with SharePoint Object Model</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;h4 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 19pt;&quot;&gt;Using SharePoint Data and Objects Efficiently&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Caching is one good way to improve system performance. However, you must weigh the benefits of caching against the need for thread safety. Additionally, you should not create certain SharePoint objects within event receivers because this will cause performance problems related to excessive database calls.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;This section describes these common areas of concern so that you can learn ways to optimize your use of SharePoint objects and data.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;Caching Data and Objects&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Many developers use the Microsoft .NET Framework caching objects (for example,&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;System.Web.Caching.Cache&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;) to help take better advantage of memory and increase overall system performance. But many objects are not &quot;thread safe&quot; and caching those objects can cause applications to fail and unexpected or unrelated user errors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background-color: white; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; width: 585px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;height: 15.75pt;&quot;&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #fcfec5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; height: 15.75pt; padding-bottom: 0.75pt; padding-left: 8.25pt; padding-right: 8.25pt; padding-top: 7.5pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;&lt;img alt=&quot;Bb687949.note(en-us,office.12).gif&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;file:///C:/Users/v-rahbac/AppData/Local/Temp/1/OICE_79D7B5D2-491C-421D-A11A-911F3C4687DD.0/msohtmlclip1/01/clip_image001.gif&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; v:shapes=&quot;note&quot; width=&quot;1&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #fcfec5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 7.5pt; padding-left: 8.25pt; padding-right: 8.25pt; padding-top: 0.75pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.75pt; margin-left: 0.75pt; margin-right: 0.75pt; margin-top: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The caching techniques discussed in this section are not the same as the custom caching options for Web content management that are discussed in&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa589700.aspx&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;Custom Caching Overview&lt;/span&gt;&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;Caching SharePoint Objects That Are Not Thread Safe&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;You might try to increase performance and memory usage by caching&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPListItemCollection&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;objects that are returned from queries. In general, this is a good practice; however, the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPListItemCollection&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object contains an embedded&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;object that is not thread safe and should not be cached.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;For example, assume the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPListItemCollection&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object is cached in a thread. As other threads try to read this object, the application can fail or behave strangely because the embedded&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object is not thread safe. For more information about the&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object and thread safety, see the&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.aspx&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;Microsoft.SharePoint.SPWeb&lt;/span&gt;&lt;/a&gt;&amp;nbsp;class.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The guidance in the following section describes how you can prevent multiple threads from attempting to read the same cached object.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;Understanding the Potential Pitfalls of Thread Synchronization&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;You might not be aware that your code is running in a multithreaded environment (by default, Internet Information Services, or IIS, is multithreaded) or how to manage that environment. The following example shows the code some developers use to cache&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitemcollection.aspx&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;Microsoft.SharePoint.SPListItemCollection&lt;/span&gt;&lt;/a&gt;&amp;nbsp;objects.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Bad Coding Practice&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Caching an Object That Multiple Threads Might Read&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet0&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;CacheData()&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPListItemCollection oListItems;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;oListItems = (SPListItemCollection)Cache[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;ListItemCacheName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;(oListItems ==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oListItems = DoQueryToReturnItems();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Cache.Add(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;ListItemCacheName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;, oListItems, ..);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Although the use of the cache in this example is functionally correct, because the ASP.NET cache object is thread safe, it introduces potential performance problems. (For more information about ASP.NET caching, see the&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.web.caching.cache.aspx&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;Cache&lt;/span&gt;&lt;/a&gt;&amp;nbsp;class.) If the query in the preceding example takes 10 seconds to complete, many users could try to access that page simultaneously during that amount of time. In this case, all of the users would run the same query, which would attempt to update the same cache object. If that same query runs 10, 50, or 100 times, with multiple threads trying to update the same object at the same time—especially on multiprocess, hyperthreaded computers—performance problems would become especially severe.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;To prevent multiple queries from accessing the same objects simultaneously, you must change the code as follows.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Applying a Lock&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Checking for null&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet1&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;_lock =&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;CacheData()&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPListItemCollection oListItems;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;lock&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;(_lock)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oListItems = (SPListItemCollection)Cache[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;ListItemCacheName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;(oListItems ==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oListItems = DoQueryToReturnItems();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Cache.Add(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;ListItemCacheName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;, oListItems, ..);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;You can increase performance slightly by placing the lock inside the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;if(oListItems == null)&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;code block. When you do this, you do not need to suspend all threads while checking to see if the data is already cached. Depending on the time it takes the query to return the data, it is still possible that more than one user might be running the query at the same time. This is especially true if you are running on multiprocessor computers. Remember that the more processors that are running and the longer the query takes to run, the more likely putting the lock in the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;if()&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;code block will cause problems. If you want to make absolutely sure that another thread has not created&lt;/span&gt;&lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;oListItems&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;before the current thread has a chance to work on it, you could use the following pattern.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Applying a Lock&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Rechecking for null&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet2&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;_lock =&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;CacheData()&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPListItemCollection oListItems;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oListItems = (SPListItemCollection)Cache[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;ListItemCacheName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;(oListItems ==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&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: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;lock&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(_lock)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;//Ensure that the data was not loaded by a concurrent thread while waiting for lock.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;oListItems = (SPListItemCollection)Cache[“ListItemCacheName”];&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(oListItems ==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;oListItems = DoQueryToReturnItems();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;Cache.Add(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;ListItemCacheName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;, oListItems, ..);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;If the cache is already populated, this last example performs as well as the initial implementation. If the cache is not populated and the system is under a light load, acquiring the lock will cause a slight performance penalty. This approach should significantly improve performance when the system is under a heavy load, because the query will be executed only once instead of multiple times, and queries are usually expensive in comparison with the cost of synchronization.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The code in these examples suspends all other threads in a critical section running in IIS, and prevents other threads from accessing the cached object until it is completely built. This addresses the thread synchronization issue; however, the code is still not correct because it is caching an object that is not thread safe.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;To address thread safety, you can cache a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;DataTable&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object that is created from the&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPListItemCollection&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object. You would modify the previous example as follows so that your code gets the data from the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;DataTable&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Good Coding Practice&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Caching a DataTable Object&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet3&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;private&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;_lock =&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;object&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;CacheData()&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;DataTable oDataTable;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPListItemCollection oListItems;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;lock&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;(_lock)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oDataTable = (DataTable)Cache[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;ListItemCacheName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;(oDataTable ==&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;oListItems = DoQueryToReturnItems();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;oDataTable = oListItems.GetDataTable();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;Cache.Add(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;ListItemCacheName&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;, oDataTable, ..);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;For more information and examples of using the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;DataTable&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object, and other good ideas for developing SharePoint applications, see the reference topic for the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;DataTable&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;class.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;Using Objects in Event Receivers&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Do not instantiate&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPSite&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;, or&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPListItem&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;objects within an event receiver. Event receivers that instantiate&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPSite&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;, or&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPListItem&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;objects instead of using the instances passed via the event properties can cause the following problems:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 2.5em; padding-right: 2.5em; padding-top: 0px; text-align: -webkit-auto;&quot; type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;They incur significant additional roundtrips to the database. (One write operation can result in up to five additional roundtrips in each event receiver.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Calling the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Update&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;method on these instances can cause subsequent&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Update&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;calls in other registered event receivers to fail.&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Bad Coding Practice&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Instantiating an SPSite Object Inside an Event Receiver&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet4&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;override&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;ItemDeleting(SPItemEventProperties properties)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(SPSite site =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;SPSite(properties.WebUrl))&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;using&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(SPWeb web = site.OpenWeb())&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPList list = web.Lists[properties.ListId];&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPListItem item = list.GetItemByUniqueId(properties.ListItemId);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Operate on item.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Good Coding Practice&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Using SPItemEventProperties&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet5&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Retrieve SPWeb and SPListItem from SPItemEventProperties instead of&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// from a new instance of SPSite.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPWeb web = properties.OpenWeb();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Operate on SPWeb object.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPListItem item = properties.ListItem;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Operate on item.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;If you do not apply this fix in your code, when you call&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Update&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;on the new instance, you must invalidate it with the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Invalidate&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;method in the appropriate child class of&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPEventPropertiesBase&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;(for example,&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPItemEventProperties.InvalidateListItem&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;or&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPItemEventProperties.InvalidateWeb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #3f529c; font-family: Verdana, sans-serif; font-size: 19pt;&quot;&gt;Working with Folders and Lists&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;When folders and lists grow in size, custom code that works with them needs to be designed in ways that optimize performance. Otherwise, your applications will run slowly and even cause timeouts to occur. The following recommendations for addressing performance concerns while working with large folders and lists are based on the test results reported in Steve Peschka&#39;s white paper,&amp;nbsp;&lt;a href=&quot;http://go.microsoft.com/fwlink?LinkId=95450&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;Working with Large Lists in Office SharePoint Server 2007&lt;/span&gt;&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol start=&quot;1&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;&quot; type=&quot;1&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Do not use&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;.&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;selects all items from all subfolders, including all fields in the list. Use the following alternatives for each use case.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul style=&quot;line-height: 1.4; list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 2.5em; padding-right: 2.5em; padding-top: 0px;&quot; type=&quot;circle&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Retrieving all items in a list&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Use&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.GetItems(SPQuery query)&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;instead. Apply filters, if appropriate, and specify only the fields you need to make the query more efficient. If the list contains more than 2,000 items, you will need to paginate the list in increments of no more than 2,000 items. The following code example shows how to paginate a large list.&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Good Coding Practice&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Retrieving Items with SPList.GetItems&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet6&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPQuery query =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;SPQuery();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPListItemCollection spListItems ;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;lastItemIdOnPage =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Page position.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;itemCount = 2000&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(itemCount == 2000)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Include only the fields you will use.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query.ViewFields =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;&lt;fieldref name=&quot;\&amp;quot;ID\&amp;quot;/&quot;&gt;&lt;fieldref name=&quot;\&amp;quot;ContentTypeId\&amp;quot;/&quot;&gt;&quot;&lt;/fieldref&gt;&lt;/fieldref&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query.RowLimit = 2000;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Only select the top 2000.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Include items in subfolder (if necessary).&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query.ViewAttributes =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;Scope=\&quot;Recursive\&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;StringBuilder sb =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;StringBuilder();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// To make it order by ID and stop scanning the table, specify the OrderBy override attribute.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sb.Append(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;&lt;orderby override=&quot;\&amp;quot;TRUE\&amp;quot;&quot;&gt;&lt;fieldref name=&quot;\&amp;quot;ID\&amp;quot;/&quot;&gt;&lt;/fieldref&gt;&lt;/orderby&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;//.. Append more text as necessary ..&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query.Query = sb.ToString();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Get 2,000 more items.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPListItemCollectionPosition pos =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;SPListItemCollectionPosition(lastItemIdOnPage);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query.ListItemCollectionPosition = pos;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;//page info&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;spListItems = spList.GetItems(query);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lastItemIdOnPage =&amp;nbsp;spListItems.ListItemCollectionPosition.PagingInfo;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Code to enumerate the spListItems.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// If itemCount &amp;lt;2000, we finish the enumeration.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;itemCount = spListItems.Count;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 12pt; margin-left: 1in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The following example shows how to enumerate and paginate a large list.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet7&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 1in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPWeb oWebsite = SPContext.Current.Web;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPList oList = oWebsite.Lists[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;Announcements&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPQuery oQuery =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;SPQuery();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;oQuery.RowLimit = 10;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;intIndex = 1;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;do&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Response.Write(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;&lt;br /&gt;
Page: &quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;+ intIndex +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;&lt;br /&gt;
&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPListItemCollection collListItems = oList.GetItems(oQuery);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(SPListItem oListItem&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;collListItems)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Response.Write(SPEncode.HtmlEncode(oListItem[&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;Title&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;].ToString()) +&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;&lt;br /&gt;
&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oQuery.ListItemCollectionPosition = collListItems.ListItemCollectionPosition;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intIndex++;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(oQuery.ListItemCollectionPosition !=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; margin-left: 1in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ol start=&quot;1&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;&quot; type=&quot;1&quot;&gt;&lt;ul style=&quot;line-height: 1.4; list-style-image: initial; list-style-position: initial; list-style-type: disc; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 2.5em; padding-right: 2.5em; padding-top: 0px;&quot; type=&quot;circle&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Getting items by identifier&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Instead of using&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items.GetItemById&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;, use&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.GetItemById(int id, string field1, params string[] fields)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;. Specify the item identifier and the field that you want.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Do not enumerate entire&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;collections or&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPFolder.Files&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;collections.&lt;br /&gt;
&lt;br /&gt;
Accessing the methods and properties that are listed in the left column of the following table will enumerate the entire&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;collection, and cause poor performance and throttling for large lists. Instead, use the alternatives listed in the right column.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 0.5in; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #3f529c; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;Table 1. Alternatives to SPList.Items&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background-color: white; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-left: 0.5in; width: 573px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;height: 15.75pt;&quot;&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #e5e5e5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; height: 15.75pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;Poor Performing Methods and Properties&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items.Count&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items.XmlDataSchema&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items.NumberOfFields&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items[System.Guid]&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items[System.Int32]&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items.GetItemById(System.Int32)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.Items.ReorderItems(System.Boolean[],System.Int32[],System.Int32)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPFolder.Files.Count&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;Better Performing Alternatives&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.ItemCount&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Create an&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPQuery&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object to retrieve only the items you want.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Create an&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPQuery&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object (specifying the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;ViewFields&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;) to retrieve only the items you want.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.GetItemByUniqueId(System.Guid)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.GetItemById(System.Int32)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.GetItemById(System.Int32)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Perform a paged query by using&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPQuery&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;and reorder the items within each page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPFolder.ItemCount&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #fcfec5; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background-color: white; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-left: 0.5in; width: 585px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;height: 15.75pt;&quot;&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #fcfec5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; height: 15.75pt; padding-bottom: 0.75pt; padding-left: 8.25pt; padding-right: 8.25pt; padding-top: 7.5pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;&lt;img alt=&quot;Bb687949.note(en-us,office.12).gif&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;file:///C:/Users/v-rahbac/AppData/Local/Temp/1/OICE_79D7B5D2-491C-421D-A11A-911F3C4687DD.0/msohtmlclip1/01/clip_image001.gif&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: transparent; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: solid; border-bottom-width: 1px; border-image: initial; border-left-color: transparent; border-left-style: solid; border-left-width: 1px; border-right-color: transparent; border-right-style: solid; border-right-width: 1px; border-top-color: transparent; border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: solid; border-top-width: 1px; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 0px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px;&quot; v:shapes=&quot;_x0000_i1026&quot; width=&quot;1&quot; /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;Note:&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #fcfec5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 7.5pt; padding-left: 8.25pt; padding-right: 8.25pt; padding-top: 0.75pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.75pt; margin-left: 0.75pt; margin-right: 0.75pt; margin-top: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;The&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList.ItemCount&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;property is the recommended way to retrieve the number of items in a list. As a side effect of tuning this property for performance, however, the property can occasionally return unexpected results. If the precise number is required, you should use the poorer performing&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;GetItems(SPQuery query)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;, as shown in the preceding code example.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;ol start=&quot;3&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;&quot; type=&quot;1&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Use&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;PortalSiteMapProvider&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;(Microsoft Office SharePoint Server 2007 only).&lt;br /&gt;
&lt;br /&gt;
Steve Peschka&#39;s white paper&amp;nbsp;&lt;a href=&quot;http://go.microsoft.com/fwlink?LinkId=95450&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;Working with Large Lists in Office SharePoint Server 2007&lt;/span&gt;&lt;/a&gt;&amp;nbsp;describes an efficient approach to retrieving list data in Office SharePoint Server 2007 by using the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;PortalSiteMapProvider&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;class.&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;PortalSiteMapProvider&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;provides an automatic caching infrastructure for retrieving list data. The&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;GetCachedListItemsByQuery&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;method of&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;PortalSiteMapProvider&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;takes an&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPQuery&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object as a parameter, and then checks its cache to determine whether the items already exist. If they do, the method returns the cached results. If not, it queries the list and stores the results in a cache. This approach works especially well when you are retrieving list data that does not change significantly over time. When data sets change frequently, the class incurs the performance cost of continually writing to the cache in addition to the costs of reading from the database. Consider that the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;PortalSiteMapProvider&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;class uses the site collection object cache to store data. This cache has a default size of 100 MB. You can increase the size of this cache for each site collection on the object cache settings page for the site collection. But this memory is taken from the shared memory available to the application pool and can therefore affect the performance of other applications. Another significant limitation is that you cannot use the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;PortalSiteMapProvider&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;class in applications based on Windows Forms. The following code example shows how to use this method.&lt;br /&gt;
&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Good Coding Practice&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Using PortalSiteMap Provider&lt;/span&gt;&lt;/i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 0.5in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet8&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 0.5in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 0.5in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 0.5in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 0.5in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 0.5in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Get the current SPWeb object.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPWeb curWeb = SPControl.GetContextWeb(HttpContext.Current);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Create the query.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SPQuery curQry =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;SPQuery();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;curQry.Query = &quot;&lt;where&gt;&lt;eq&gt;&lt;fieldref name=&quot;&amp;lt;/span&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: 10pt;&quot;&gt;&#39;Expense_x0020_Category&#39;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/fieldref&gt;&lt;/eq&gt;&lt;/where&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&lt;value type=&quot;&amp;lt;/span&quot;&gt;&lt;span style=&quot;color: #a31515; font-size: 10pt;&quot;&gt;&#39;Text&#39;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&amp;gt;Hotel&lt;/span&gt;&lt;/value&gt;&quot;;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Create an instance of PortalSiteMapProvider.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;PortalSiteMapProvider ps = PortalSiteMapProvider.WebSiteMapProvider;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;PortalWebSiteMapNode pNode = ps.FindSiteMapNode(curWeb.ServerRelativeUrl)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;as&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;PortalWebSiteMapNode;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Retrieve the items.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;SiteMapNodeCollection pItems = ps.GetCachedListItemsByQuery(pNode,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 10pt;&quot;&gt;&quot;myListName_NotID&quot;&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;, curQry, curWeb);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Enumerate through all of the matches.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(PortalListItemSiteMapNode pItem&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;pItems)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-family: Consolas; font-size: 10pt;&quot;&gt;// Do something with each match.&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; margin-left: 0.5in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ol start=&quot;4&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: -webkit-auto;&quot; type=&quot;1&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;color: black; line-height: normal; margin-bottom: 0.25em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Whenever possible, acquire a reference to a list by using the list&#39;s GUID or URL as a key.&lt;br /&gt;
&lt;br /&gt;
You can retrieve an&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPList&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object from the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb.Lists&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;property by using the list&#39;s GUID or display name as an indexer. Using&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb.Lists[GUID]&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;and&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb.GetList(strURL)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;is always preferable to using&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb.Lists[strDisplayName]&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;. Using the GUID is preferable because it is unique, permanent, and requires only a single database lookup. The display name indexer retrieves the names of all the lists in the site and then does a string comparison with them. If you have a list URL instead of a GUID, you can use the&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-left: 0.5in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;GetList&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 12pt; margin-left: 0.5in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;method to look up the list&#39;s GUID in the content database before retrieving the list.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #3f529c; font-family: Verdana, sans-serif; font-size: 19pt;&quot;&gt;Writing Applications That Scale to Large Numbers of Users&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;You might not be aware that you need to write your code to be scalable so that it can handle multiple users simultaneously. A good example is creating custom navigation information for all sites and subsites on each page or as part of a master page. If you have a SharePoint site on a corporate intranet and each department has its own site with many subsites, your code might resemble the following.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet9&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;GetNavigationInfoForAllSitesAndWebs()&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;(SPSite oSPSite&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;SPContext.Current.Site.WebApplication.Sites)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SPWeb oSPWeb&amp;nbsp;&amp;nbsp;= oSPSite.RootWeb;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAllWebs(oSPWeb );&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;finally&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oSPSite.Dispose();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;a href=&quot;http://rahulbach.blogspot.in/2010/08/best-practices-common-coding-issues.html&quot; name=&quot;CodeSpippet10&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;VB&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;C#&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;C++&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;F#&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eff5ff; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; vertical-align: middle;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;JScript&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&lt;a href=&quot;file:///D:/Rahul/Sharepoint%202010/Sharepoint%202010%20Videos/Best%20coding%20practices.doc&quot; style=&quot;color: #b5653b; text-decoration: none;&quot; title=&quot;Copy to clipboard.&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; color: #1364c4;&quot;&gt;Copy&lt;/span&gt;&lt;/a&gt;&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;AddAllWebs(SPWeb oSPWeb)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;(SPWeb oSubWeb&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;oSPWeb.Webs)&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;try&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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: green; font-family: Consolas; font-size: 10pt;&quot;&gt;//.. Code to add items ..&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddAllWebs(oSubWeb);&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;finally&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;(oSubWeb !=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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;oSubWeb.Dispose();&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&quot;&gt;&amp;nbsp;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 9pt; text-align: -webkit-auto; word-break: break-all;&quot;&gt;&lt;span style=&quot;color: black; font-family: Consolas; font-size: 10pt;&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;While the previous code disposes of objects properly, it still causes problems because the code iterates through the same lists over and over. For example, if you have 10 site collections and an average of 20 sites or subsites per site collection, you would iterate through the same code 200 times. For a small number of users this might not cause bad performance. But, as you add more users to the system, the problem gets worse, as shown in Table 2.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #3f529c; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;Table 2. Iterations increase as number of users increases&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background-color: white; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; width: 585px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;height: 15.75pt;&quot;&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #e5e5e5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; height: 15.75pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;Users&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #e5e5e5; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; height: 15.75pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 11.5pt;&quot;&gt;Iterations&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: initial; border-top-style: none; border-top-width: initial; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;2000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: initial; border-top-style: none; border-top-width: initial; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;10000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;100&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: initial; border-top-style: none; border-top-width: initial; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;200000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-image: initial; border-left-color: rgb(187, 187, 187); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(187, 187, 187); border-top-style: solid; border-top-width: 1pt; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;250&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(187, 187, 187); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: initial; border-left-style: none; border-left-width: initial; border-right-color: rgb(187, 187, 187); border-right-style: solid; border-right-width: 1pt; border-top-color: initial; border-top-style: none; border-top-width: initial; padding-bottom: 3pt; padding-left: 3pt; padding-right: 3pt; padding-top: 3pt;&quot; valign=&quot;top&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.75pt; margin-right: 0.75pt;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;500000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Although the code executes for each user that hits the system, the data remains the same for each user. The impact of this can vary depending on what the code is doing. In some cases, repeating code might not cause a performance problem; however, in the previous example the system must create a COM object (&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPSite&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPWeb&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;objects are created when retrieved from their collections), retrieve data from the object, and then dispose of the object for each item in the collection. This can have a significant impact on performance.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;How to make this code more scalable or fine-tune it for a multiple user environment can be a hard question to answer. It depends on what the application is designed to do.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;You should take the following into consideration when asking how to make code more scalable:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 2.5em; padding-right: 2.5em; padding-top: 0px; text-align: -webkit-auto;&quot; type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Is the data static (seldom changes), somewhat static (changes occasionally), or dynamic (changes constantly)?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Is the data the same for all users, or does it change? For example, does it change depending on the user who is logged on, the part of the site being accessed, or the time of year (seasonal information)?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Is the data easily accessible or does it require a long time to return the data? For example, is it returning from a long-running database query or from remote databases that can have some network latency in the data transfers?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Is the data public or does it require a higher level of security?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;What is the size of the data?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Is the SharePoint site on a single server or on a server farm?&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-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;How you answer the previous questions will determine in which of several ways you can make your code more scalable and handle multiple users. The intent of this article is not to provide answers for all of the questions or scenarios but to provide a few ideas that you can apply to your specific needs. The following sections offer areas for your consideration.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;Caching Raw Data&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;You can cache your data by using the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;System.Web.Caching.Cache&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object. This object requires that you query the data one time and store it in the cache for access by other users.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;If your data is static, you can set up the cache to load the data only one time and not expire until the application is restarted, or to load the data once per day to ensure data freshness. You can create the cache item when the application starts, when the first user session starts, or when the first user tries to access that data.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;If your data is somewhat static, you can set up the cached items to expire within a certain number of seconds, minutes, or hours after the data is created. This enables you to refresh your data within a timeframe that is acceptable to your users. Even if the data is cached for only 30 seconds, under heavy loads you will still see improved performance because you are running the code only one time every 30 seconds instead of multiple times per second for each user who hits the system.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Security trimming is another issue to consider whenever you cache data. For example, if you cache items as you iterate through a list, you may get only a subset of the data (the data that the current user can see), or if you use a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;DataTable&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object to cache all of the items in a list, you have no easy way of applying security trimming to users who belong to groups that can see only a subset of the data. For more information about storing security trimmed data in caches, see the&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.crosslistquerycache.aspx&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;CrossListQueryCache&lt;/span&gt;&lt;/a&gt;&amp;nbsp;class.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;In addition, ensure you consider the issues described earlier in&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb687949.aspx#WSS3CodingSharePointOM_CachingDataandObjects#WSS3CodingSharePointOM_CachingDataandObjects&quot; style=&quot;color: #b5653b; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #1364c4;&quot;&gt;Caching Data and Objects&lt;/span&gt;&lt;/a&gt;.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;Building Data Before Displaying It&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Think about how your cached data will be used. If this data is used to make run-time decisions, putting it into a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;DataSet&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;or&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;DataTable&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object might be the best way to store it. You can then query those objects for the data to make run-time decisions. If the data is being used to display a list, table, or formatted page to the user, consider building a display object and storing that object in the cache. At run time, you need only retrieve the object from the cache and call its render function to display its contents. You could also store the rendered output; however, this can lead to security issues and the cached item could be quite large, causing increased page swapping or memory fragmentation.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif;&quot;&gt;Caching For a Single Server or Server Farm&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Depending on how you set up your SharePoint site, you might have to address certain caching issues differently. If your data must be the same on all servers at all times, then you must ensure that the same data is cached on each server.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;One way to ensure this is to create the cached data and store it on a common server or in a Microsoft SQL Server database. Again, you must consider how much time it takes to access the data and what security issues can arise from storing the data on a common server.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;You can also create business-layer objects that cache data on a common sever, and then access that data by using various interprocess communications that are available in networking objects or APIs.&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0in; text-align: -webkit-auto;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #3f529c; font-family: Verdana, sans-serif; font-size: 19pt;&quot;&gt;Using SPQuery Objects&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; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPQuery objects can cause performance problems whenever they return large result sets. The following suggestions will help you optimize your code so that performance will not suffer greatly whenever your searches return large numbers of items.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;background-color: white; color: #4e2800; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 2.5em; padding-right: 2.5em; padding-top: 0px; text-align: -webkit-auto;&quot; type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Do not use an unbounded&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPQuery&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object.&lt;br /&gt;
&lt;br /&gt;
An&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPQuery&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;object without a value for&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;RowLimit&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;will perform poorly and fail on large lists. Specify a&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;RowLimit&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;between 1 and 2000 and, if necessary, page through the list.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;Use indexed fields.&lt;br /&gt;
&lt;br /&gt;
If you query on a field that is not indexed, the query will be blocked whenever it would result in a scan of more items than the query threshold (as soon as there are more items in the list than are specified in the query threshold). Set&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;SPQuery.RowLimit&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;to a value that is less than the query threshold.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: black; line-height: normal; margin-bottom: 12pt; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.25em; padding-left: 0px; padding-right: 0px; padding-top: 0.25em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;If you know the URL of your list item and want to query by&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;FileRef&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;, use&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;SPWeb.GetListItem(string strUrl, string field1, params string[] fields)&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 10pt;&quot;&gt;&amp;nbsp;instead.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/8432800214275025075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/8432800214275025075?isPopup=true' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8432800214275025075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8432800214275025075'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2012/03/best-practices-common-coding-issues.html' title='Best Practices: Common Coding Issues with SharePoint Object Model'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-4249665677372316783</id><published>2011-12-10T12:01:00.002+05:30</published><updated>2011-12-10T12:01:19.303+05:30</updated><title type='text'>How to create Sharepoint 2010 Modal Dialog Pop up ( Popup with Faded Background )</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;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt; line-height: 16px;&quot;&gt;Many a times we have a requirement like we need to open a Pop-up with the Faded Background. Sharepoint 2010 has provided us a very simple way to achieve this.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt; line-height: 16px;&quot;&gt;Below is the JavaScript with the help of which we can open a Modal Dailog Pop Up of Sharepoint 2010.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;type&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;&amp;nbsp;OpenDialog(&lt;b&gt;&lt;span style=&quot;color: maroon;&quot;&gt;URL&lt;/span&gt;&lt;/b&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;var&lt;/span&gt;&amp;nbsp;NewPopUp = SP.UI.$create_DialogOptions();&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NewPopUp.url =&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: maroon;&quot;&gt;URL&lt;/span&gt;&lt;/b&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NewPopUp.width = 700;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NewPopUp.height = 350;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SP.UI.ModalDialog.showModalDialog(NewPopUp);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;script&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt; line-height: 16px;&quot;&gt;Call the Javascript on Button click and the modal PopUp will pops up with the Page of Specified URL.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;font-family: &#39;Bookman Old Style&#39;, serif; font-size: 12pt;&quot;&gt;btnOpenPopUp.Attributes.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;onClick&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;javascript:OpenDialog(‘/_layouts/MyAppPage/MyPage.aspx’);&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;background-color: #fefdfa; clear: both; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 21px; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoXlSyf6c8LmorLmAlLbOWkucE-HgKj09FxNbEW2X0YRqprFOqlmspZf5YRTjABav2dFuoS7Kf6BzOy8Bb1PBYDXXGVKtFoQfsdzEKCozw8WE7qZOgjx21Ss_zdKQj1kuM8pkolMY_mmE/s1600/PopUp.png&quot; imageanchor=&quot;1&quot; style=&quot;color: #d52a33; margin-left: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;134&quot; j8=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoXlSyf6c8LmorLmAlLbOWkucE-HgKj09FxNbEW2X0YRqprFOqlmspZf5YRTjABav2dFuoS7Kf6BzOy8Bb1PBYDXXGVKtFoQfsdzEKCozw8WE7qZOgjx21Ss_zdKQj1kuM8pkolMY_mmE/s320/PopUp.png&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 20px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-left-radius: 5px 5px; border-bottom-right-radius: 5px 5px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-left-radius: 5px 5px; border-top-right-radius: 5px 5px; border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.199219) 0px 0px 20px; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/4249665677372316783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/4249665677372316783?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/4249665677372316783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/4249665677372316783'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/12/how-to-create-sharepoint-2010-modal.html' title='How to create Sharepoint 2010 Modal Dialog Pop up ( Popup with Faded Background )'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoXlSyf6c8LmorLmAlLbOWkucE-HgKj09FxNbEW2X0YRqprFOqlmspZf5YRTjABav2dFuoS7Kf6BzOy8Bb1PBYDXXGVKtFoQfsdzEKCozw8WE7qZOgjx21Ss_zdKQj1kuM8pkolMY_mmE/s72-c/PopUp.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-1239789286841908715</id><published>2011-11-19T14:48:00.001+05:30</published><updated>2011-11-19T14:57:49.824+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Management of Master Lists in SharePoint with Choice Filter Lookup column"/><category scheme="http://www.blogger.com/atom/ns#" term="Master list  Consolidated Consumer List View"/><title type='text'>Management of Master Lists in SharePoint with Choice Filter Lookup column</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 style=&quot;border-bottom-color: rgb(79, 129, 189); border-bottom-style: solid; border-bottom-width: 1pt; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; padding-bottom: 4pt; padding-left: 0in; padding-right: 0in; padding-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;div class=&quot;MsoTitle&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; color: #17365d; font-family: Cambria, serif; font-size: 26pt; letter-spacing: 0.25pt; margin-bottom: 15pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;Almost every SharePoint project needs Lookup column. To create each lookup column we need to create separate list. If a requirement comes where developer needs to use master lists for different data then developer needs to create multiple lists which is resource consuming and maintaining multiple list also extra effort required for developer and administrator also. For this type of requirement I have created Choice Filter Lookup column. User can create one choice column in Master list and filter lookup column based on that choice column.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-family: Calibri, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;You can download the &lt;a href=&quot;http://choicefilterlookup.codeplex.com/releases/77127/download/305068&quot; target=&quot;_blank&quot;&gt;Source code from here&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;Current Scenario&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/AVvXsEj8_GhVVq3n14asMm2H62ozYWYDhyD6bRf8IKB5QU4KU_zR2-1__usFpX0zbJ2-CtYMFWXB86azzi2pZusdIAus1zAYwMhMCKXt0f2ua8ZA1LDCtKWDouVs34NbGgRmn11fR9yMu69957Hp/s1600/image006.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;268&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8_GhVVq3n14asMm2H62ozYWYDhyD6bRf8IKB5QU4KU_zR2-1__usFpX0zbJ2-CtYMFWXB86azzi2pZusdIAus1zAYwMhMCKXt0f2ua8ZA1LDCtKWDouVs34NbGgRmn11fR9yMu69957Hp/s320/image006.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;height: 115px; margin-left: 10px; margin-top: 235px; position: absolute; width: 109px; z-index: 251654144;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;MasterList1&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&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/AVvXsEhd0lagegMACY_nX4YU9obYnWrd0Z8v3FLeCzsmmwiT5kgwYL5U3yLaTJPfYfb6V9QpeFchCtnp26rJwGV5TB_-I0N6KklAdF32kMABMTicBNZe_FhHNyj1QjA-ZP13synC0-1DKWWlMZHA/s1600/image008.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/AVvXsEhd0lagegMACY_nX4YU9obYnWrd0Z8v3FLeCzsmmwiT5kgwYL5U3yLaTJPfYfb6V9QpeFchCtnp26rJwGV5TB_-I0N6KklAdF32kMABMTicBNZe_FhHNyj1QjA-ZP13synC0-1DKWWlMZHA/s1600/image008.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;MasterList2&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&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/AVvXsEgCiOa-GjUMUilSZCMsjdyc39EBhUq8iuDu27QD1x-q3xsddslSKHF-HCq9MY3SduO2sC5hP63EdeqFz5voom6KXLcXeIYWvfpzNT9zDcclay3Flxx3RjT1Pc3H0B7PZ1z2xD0bpHc5AJoX/s1600/image010.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/AVvXsEgCiOa-GjUMUilSZCMsjdyc39EBhUq8iuDu27QD1x-q3xsddslSKHF-HCq9MY3SduO2sC5hP63EdeqFz5voom6KXLcXeIYWvfpzNT9zDcclay3Flxx3RjT1Pc3H0B7PZ1z2xD0bpHc5AJoX/s1600/image010.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;MasterList3&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&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/AVvXsEiGEHLU9NyAzS4cBzn6uLReNPxiFpwNXC9PhyphenhyphenqAMP2zpgRT1HAIqQlRmh4HXXOIoKf_tLVfrTEpuOnP4W7WIXeRrbXz1-IYSCe5zOCvTVzxI58VCMuw5mhEPZY8X8UK6WhorX_FCNw-xpHX/s1600/image012.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/AVvXsEiGEHLU9NyAzS4cBzn6uLReNPxiFpwNXC9PhyphenhyphenqAMP2zpgRT1HAIqQlRmh4HXXOIoKf_tLVfrTEpuOnP4W7WIXeRrbXz1-IYSCe5zOCvTVzxI58VCMuw5mhEPZY8X8UK6WhorX_FCNw-xpHX/s1600/image012.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;MasterList4&lt;/div&gt;&lt;div style=&quot;text-align: -webkit-auto;&quot;&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/AVvXsEgrDfhWc4w4O2S2yP6ATFXJ-i5ShgF1YX9_Uh9zb5C7ebEUIDX5BptVw_zA8Isx3lIUiNAFlCNBXfih5M54Tbw3az-kn-BK_cBB-U_VzNnAntsoH2XaoURsQO7mx6P3yYb08BQX2yI5KCVP/s1600/image014.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/AVvXsEgrDfhWc4w4O2S2yP6ATFXJ-i5ShgF1YX9_Uh9zb5C7ebEUIDX5BptVw_zA8Isx3lIUiNAFlCNBXfih5M54Tbw3az-kn-BK_cBB-U_VzNnAntsoH2XaoURsQO7mx6P3yYb08BQX2yI5KCVP/s1600/image014.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;MasterConsumerList New or Edit Form&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&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/AVvXsEgtm8nU4h55mPQuo5zMPKypAH9-GUruionpDjwVorpQanJ-rslWpkRHTB_vEhcnXUZiXn49vHSjzcKMNDz9CNkxO1bYNcxgGPFZzv9HPohSR2EAu6kNvaI3AJpqGGFLx-Pi5UP4fwLCbcaL/s1600/image016.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtm8nU4h55mPQuo5zMPKypAH9-GUruionpDjwVorpQanJ-rslWpkRHTB_vEhcnXUZiXn49vHSjzcKMNDz9CNkxO1bYNcxgGPFZzv9HPohSR2EAu6kNvaI3AJpqGGFLx-Pi5UP4fwLCbcaL/s320/image016.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;MasterConsumerList View&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/AVvXsEjwyjVOhAg5RdXTo9GVGWqNMV939oeBQK7YKmlbEU7oz9ibo7AO2ZfYQlXKYtoALrKvlJNlam9hhQ2s-ADbzqHnrgIPRprXVIIRSa_vYXkUWOC-p53M4-ujMD6UkkwDsmHdAkwG-ZZs1Sp8/s1600/image018.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;62&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwyjVOhAg5RdXTo9GVGWqNMV939oeBQK7YKmlbEU7oz9ibo7AO2ZfYQlXKYtoALrKvlJNlam9hhQ2s-ADbzqHnrgIPRprXVIIRSa_vYXkUWOC-p53M4-ujMD6UkkwDsmHdAkwG-ZZs1Sp8/s640/image018.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;Now above screen shot shows the real or actual implementation of requirements which generally SharePoint developers and Administrator follow for creating relationship of multiple caregory and reusability.If user want to add one more lookup column then user needs to create one more list for the lookup. The only problem is with above implementation is that it is creating multiple lists which increase the resource utilization and maintainbilty. Now I have tried to resolve the above implementation by creating Choice Lookup filter column. Please refer below screen shots for same implemetation with Choice Lookup filter&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&amp;nbsp; ConsolidateMasterList and ConsolidateMasterListConsumer shows 2 new list for same implementation mentioned above&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&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/AVvXsEiFMHVeRKM5DRBJY8MQukbaQVp0Gc_ADoion1UHneqM7XdfPi-n6V_g-Sz2lupfeKfJbH726iPLyeLZtn3UphwQY7Kjli-oto0sHZ0vWSoHjdcYAVw04f0UlepAYLzmWKevkqLym4etGZK5/s1600/image024.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;303&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFMHVeRKM5DRBJY8MQukbaQVp0Gc_ADoion1UHneqM7XdfPi-n6V_g-Sz2lupfeKfJbH726iPLyeLZtn3UphwQY7Kjli-oto0sHZ0vWSoHjdcYAVw04f0UlepAYLzmWKevkqLym4etGZK5/s400/image024.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;Consolidated Master List (with new column Category as Choice column with Values {Master1, Master2, Master3, Master4} for differentiate values or for filter values based on category)&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/AVvXsEg7Dm_gk5fgb2Y6qOZfZiqFhvTg1gRYA0WfXW5rUGS3yTae2D7bC8Ls-c4PIqbjWY6uDIJ-7WlFsxzlJddjw-z3x0V3E9bW22HWddrO4Qm9yxxxkZIuNbpRIonNuJiRmuexTulBicBPdC9z/s1600/image026.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Dm_gk5fgb2Y6qOZfZiqFhvTg1gRYA0WfXW5rUGS3yTae2D7bC8Ls-c4PIqbjWY6uDIJ-7WlFsxzlJddjw-z3x0V3E9bW22HWddrO4Qm9yxxxkZIuNbpRIonNuJiRmuexTulBicBPdC9z/s640/image026.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;Create Column of Choice Filter lookup column (Choose your filter category from the dropdown)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMnez2w2lwuEa9U1X9wmDjx7Rw9FDhGYgXLewoHwLtqtJKMFhXEu9vZnZZLoKFHHiFBC8a-YW1RXxy9vQ5kDGIgBhmrZT2Pa2dtXn-gJE1VAjL_kbYSorQTj1CNvc-gygJxfE3JH9_2gY_/s1600/image028.jpg&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; font-weight: normal; line-height: normal; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMnez2w2lwuEa9U1X9wmDjx7Rw9FDhGYgXLewoHwLtqtJKMFhXEu9vZnZZLoKFHHiFBC8a-YW1RXxy9vQ5kDGIgBhmrZT2Pa2dtXn-gJE1VAjL_kbYSorQTj1CNvc-gygJxfE3JH9_2gY_/s1600/image028.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2cuiZ75Q3W-JOSHP_HiMYee6r6thx5nsuSXlx6G-qP_lrnBzxrp7NCpJFXoun-opNnk3pyBUjT68wkA6TZwpoZ0V5gUN2L-xN4KBuX5F7yVrKYO3aN7jzfmqT2tCgnXhX3jpDzWt-X9BP/s1600/image030.jpg&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium; font-weight: normal; line-height: normal; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2cuiZ75Q3W-JOSHP_HiMYee6r6thx5nsuSXlx6G-qP_lrnBzxrp7NCpJFXoun-opNnk3pyBUjT68wkA6TZwpoZ0V5gUN2L-xN4KBuX5F7yVrKYO3aN7jzfmqT2tCgnXhX3jpDzWt-X9BP/s320/image030.jpg&quot; width=&quot;253&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;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 13px; font-weight: bold; line-height: 14px;&quot;&gt;List Settings view after adding 4 choice filter lookup&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;GramE&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 13px; font-weight: bold; line-height: 14px; text-align: -webkit-auto;&quot;&gt;column&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/AVvXsEi7biXoREdnPH40XT8mbyQ8-H6917Ode5zFEQ2gUqTxIg-WkNsV73O9pBnHS6B_u6d8wj9NfGw-txQZfACnZouKgiYF5C1jWduhBM0Znr-Np57vXgk1RDADUyZG2xV3M6iamUOb0ddbBAdP/s1600/image032.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7biXoREdnPH40XT8mbyQ8-H6917Ode5zFEQ2gUqTxIg-WkNsV73O9pBnHS6B_u6d8wj9NfGw-txQZfACnZouKgiYF5C1jWduhBM0Znr-Np57vXgk1RDADUyZG2xV3M6iamUOb0ddbBAdP/s640/image032.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;Consolidated Consumer New or Edit Form&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/AVvXsEiERmptuEZAtoelIVtxanvfyXMccTYKCTU9XRdPKzvje60fzijGIr6Azgoyz-yano76Y4LJyE_hi8uA94ti2uQmdADnY4Z7QB8rRnUwnSNdgOMWGhq3caNsR4eK0UlI7Kwmdv2k56iYdcRw/s1600/image034.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;490&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiERmptuEZAtoelIVtxanvfyXMccTYKCTU9XRdPKzvje60fzijGIr6Azgoyz-yano76Y4LJyE_hi8uA94ti2uQmdADnY4Z7QB8rRnUwnSNdgOMWGhq3caNsR4eK0UlI7Kwmdv2k56iYdcRw/s640/image034.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoCaption&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 10pt; font-weight: bold; line-height: 14px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; page-break-after: avoid; text-align: -webkit-auto;&quot;&gt;Consolidated Consumer List View&amp;nbsp;2&lt;span style=&quot;font-weight: normal;&quot;&gt;MasterConsumerList View&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 17px; margin-bottom: 10pt; margin-left: 0in; margin-right: 0in; margin-top: 0in; text-align: -webkit-auto;&quot;&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/AVvXsEiy42ecWI8yEjyCVvWj5kSja4__6xp4J_d0zZkAmgrfzXWW4Wq_CdNhkIlAOZM9S4jt_bH_chUJmSRiqWucekvNT1TIE9aINEsj9-11Y1okRUQmXcpwlQsVcAxXK9mLdG0ZpRCcx2WYZiG5/s1600/image036.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;70&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy42ecWI8yEjyCVvWj5kSja4__6xp4J_d0zZkAmgrfzXWW4Wq_CdNhkIlAOZM9S4jt_bH_chUJmSRiqWucekvNT1TIE9aINEsj9-11Y1okRUQmXcpwlQsVcAxXK9mLdG0ZpRCcx2WYZiG5/s640/image036.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Happy Coding !!!!!!!!!&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/1239789286841908715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/1239789286841908715?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1239789286841908715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1239789286841908715'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/11/management-of-master-lists-in.html' title='Management of Master Lists in SharePoint with Choice Filter Lookup column'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8_GhVVq3n14asMm2H62ozYWYDhyD6bRf8IKB5QU4KU_zR2-1__usFpX0zbJ2-CtYMFWXB86azzi2pZusdIAus1zAYwMhMCKXt0f2ua8ZA1LDCtKWDouVs34NbGgRmn11fR9yMu69957Hp/s72-c/image006.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-1057988232761889612</id><published>2011-11-08T13:42:00.001+05:30</published><updated>2011-11-08T14:09:01.849+05:30</updated><title type='text'>Add Custom Property Panel in Custom WebPart like OOB SharePoint Property Panel via Reflection</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;Sometime we have a requirement to create custom property in WebPart. But the custom Property will add in “Miscellaneous” section or added in blank section if we add property via custom tool part. Now if you want to create panel like OOB Panel “Layout, Appearance etc.” then use below method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Below class is static class for enabling extension method on ToolPart class. You need to add below class in your solution and add namespace in your toolpart class where you want to use this method&lt;o:p&gt;&lt;/o:p&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;namespace&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; ExtensionMethods&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;{&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;CustomExtensions&lt;/span&gt;&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&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;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Panel&lt;/span&gt; GetPropertyPanel(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;ToolPart&lt;/span&gt; currentToolPart, &lt;span style=&quot;color: #2b91af;&quot;&gt;Table&lt;/span&gt; table, &lt;span style=&quot;color: #2b91af;&quot;&gt;String&lt;/span&gt; sTitle)&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;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;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;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 style=&quot;color: #2b91af;&quot;&gt;Panel&lt;/span&gt; controlPanel = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Panel&lt;/span&gt;();&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;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; controlPanel.ID = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;propertyPanelHideDisplay&quot;&lt;/span&gt;;&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;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; controlPanel.Attributes.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;id&quot;&lt;/span&gt;, currentToolPart.ClientID + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;_&quot;&lt;/span&gt; + controlPanel.ID);&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;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; controlPanel.Controls.Add(table);&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: #2b91af;&quot;&gt;Literal&lt;/span&gt; lt = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Literal&lt;/span&gt;();&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;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 style=&quot;color: #2b91af;&quot;&gt;String&lt;/span&gt; sScript = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&amp;lt;script language=&#39;javascript&#39;&amp;gt;\n&quot;&lt;/span&gt; +&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;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; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot; var objDiv = document.getElementById(&#39;&quot;&lt;/span&gt; + currentToolPart.ClientID + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;_&quot;&lt;/span&gt; + controlPanel.ID + &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&#39;);\n&quot;&lt;/span&gt; +&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;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; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot; objDiv.parentNode.parentNode.parentNode.attributes.removeNamedItem(&#39;colspan&#39;);\n&quot;&lt;/span&gt; +&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;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; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot; objDiv.parentNode.parentNode.parentNode.attributes.removeNamedItem(&#39;class&#39;); \n&quot;&lt;/span&gt; +&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;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; &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;&amp;lt;/script&amp;gt;&quot;&lt;/span&gt;;&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;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.Text = sScript;&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;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; controlPanel.Controls.Add(lt);&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: #2b91af;&quot;&gt;Type&lt;/span&gt; type = &lt;span style=&quot;color: blue;&quot;&gt;typeof&lt;/span&gt;(&lt;span style=&quot;color: #2b91af;&quot;&gt;SPSite&lt;/span&gt;);&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;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 style=&quot;color: #2b91af;&quot;&gt;Assembly&lt;/span&gt; assembly = type.Assembly;&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; bindingFlags = &lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.Instance | &lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.Public | &lt;span style=&quot;color: #2b91af;&quot;&gt;BindingFlags&lt;/span&gt;.NonPublic;&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: #2b91af;&quot;&gt;Panel&lt;/span&gt; propertyPanel = (&lt;span style=&quot;color: #2b91af;&quot;&gt;Panel&lt;/span&gt;)assembly.CreateInstance(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Microsoft.SharePoint.WebPartPages.TPPanel&quot;&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;, bindingFlags, &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;,&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;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 style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;object&lt;/span&gt;[] { sTitle, controlPanel, &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt; }, &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;, &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;);&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;return&lt;/span&gt; propertyPanel;&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;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;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;span style=&quot;color: blue; 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;&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;}&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;}&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;Below is the sample class for ToolPart for adding Panel by using above class&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;br /&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;using&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; ExtensionMethods;&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;span style=&quot;color: blue; font-family: Consolas; font-size: 9.5pt;&quot;&gt;namespace&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt; CustomNameSpace&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;{&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;class&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;CustomToolpart&lt;/span&gt; : &lt;span style=&quot;color: #2b91af;&quot;&gt;ToolPart&lt;/span&gt;&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&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;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DropDownList&lt;/span&gt; ddlDisplayType;&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;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; CreateChildControls()&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;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;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;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 style=&quot;color: blue;&quot;&gt;base&lt;/span&gt;.CreateChildControls();&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;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; CreateControls();&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;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;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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; ApplyChanges()&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;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;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;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; EnsureChildControls();&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;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; SendDataToWebPart();&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;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;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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; SendDataToWebPart()&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;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;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;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; EnsureChildControls();&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;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 style=&quot;color: #2b91af;&quot;&gt;CustomWebPart&lt;/span&gt; customWebPart = (&lt;span style=&quot;color: #2b91af;&quot;&gt;CustomWebPart&lt;/span&gt;)&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.ParentToolPane.SelectedWebPart;&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: green;&quot;&gt;// Send the custom text to the Web Part.&lt;/span&gt;&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;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 style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (ddlDisplayType != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)&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;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;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;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; customWebPart.Property = ddlDisplayType.SelectedValue;&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;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;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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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;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;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;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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; SyncChanges()&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;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;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;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 style=&quot;color: blue;&quot;&gt;base&lt;/span&gt;.SyncChanges();&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;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;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;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;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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; SetValues()&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;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;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;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 style=&quot;color: #2b91af;&quot;&gt;ListItem&lt;/span&gt; item = &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;;&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;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 style=&quot;color: #2b91af;&quot;&gt;CustomWebPart&lt;/span&gt; customWebPart = (&lt;span style=&quot;color: #2b91af;&quot;&gt;CustomWebPart&lt;/span&gt;)&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.ParentToolPane.SelectedWebPart;&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;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 style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (!&lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt;.IsNullOrEmpty(customWebPart.Property))&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;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;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;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; item = ddlDisplayType.Items.FindByValue(customWebPart.Property);&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;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 style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (item != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)&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;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;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;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; ddlDisplayType.SelectedValue = item.Value;&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;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;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;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;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;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; &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;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;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;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;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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; CancelChanges()&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;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;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;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 style=&quot;color: blue;&quot;&gt;base&lt;/span&gt;.CancelChanges();&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;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;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;br /&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;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; RenderToolPart(System.Web.UI.&lt;span style=&quot;color: #2b91af;&quot;&gt;HtmlTextWriter&lt;/span&gt; output)&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;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;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;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 style=&quot;color: blue;&quot;&gt;base&lt;/span&gt;.RenderToolPart(output);&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;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;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;br /&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;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; CreateControls()&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;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;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;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; &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;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; ddlDisplayType = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;DropDownList&lt;/span&gt;();&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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; ddlDisplayType.Items.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Property 1&quot;&lt;/span&gt;);&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;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; ddlDisplayType.Items.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Property 2&quot;&lt;/span&gt;);&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;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; ddlDisplayType.Items.Add(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Property 3&quot;&lt;/span&gt;);&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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; AddControls();&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;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; SetValues();&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;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; &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;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;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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; AddControls()&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;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;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;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 style=&quot;color: #2b91af;&quot;&gt;Table&lt;/span&gt; table = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Table&lt;/span&gt;();&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;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 style=&quot;color: #2b91af;&quot;&gt;TableRow&lt;/span&gt; tr = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;TableRow&lt;/span&gt;();&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;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 style=&quot;color: #2b91af;&quot;&gt;TableCell&lt;/span&gt; td = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;TableCell&lt;/span&gt;();&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;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 style=&quot;color: #2b91af;&quot;&gt;Literal&lt;/span&gt; ltStatic = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;Literal&lt;/span&gt;();&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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; ltStatic.Text = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Custom Property&quot;&lt;/span&gt;;&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;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; td.Controls.Add(ltStatic);&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;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; tr.Cells.Add(td);&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;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; table.Rows.Add(tr);&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;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;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;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; tr = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;TableRow&lt;/span&gt;();&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;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; td = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;TableCell&lt;/span&gt;();&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;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; td.Controls.Add(ddlDisplayType);&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;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; tr.Cells.Add(td);&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;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; table.Rows.Add(tr);&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;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&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 style=&quot;color: #2b91af;&quot;&gt;String&lt;/span&gt; sTitle = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Panel Title&quot;&lt;/span&gt;;&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;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;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.Controls.Add(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;.GetPropertyPanel(table, sTitle));&lt;o:p&gt;&lt;/o:p&gt;&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;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;&amp;nbsp;&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;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 9.5pt;&quot;&gt;}&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;br /&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;MsoNormal&quot;&gt;In above class bold line will return Panel and add the Panel in ToolPart Pane. Below is the screen shot for the above implementation&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;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi08dF9FEArbhaF_Wy8kylSZR81Bt0YbSQ4icKhg0x9wQ_eF0brtnEpy-5c4YB-fkzBioabcQqmDJdHqznuGioN3yykfeC3ZsnExwPr2lfqQy8WMdj71sJEfFG4yBt9y1PosByXpHqpF9KF/s1600/PropertyPanel.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;268&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi08dF9FEArbhaF_Wy8kylSZR81Bt0YbSQ4icKhg0x9wQ_eF0brtnEpy-5c4YB-fkzBioabcQqmDJdHqznuGioN3yykfeC3ZsnExwPr2lfqQy8WMdj71sJEfFG4yBt9y1PosByXpHqpF9KF/s400/PropertyPanel.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Hope it help !!!!&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/1057988232761889612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/1057988232761889612?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1057988232761889612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1057988232761889612'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/11/add-custom-property-panel-in-custom.html' title='Add Custom Property Panel in Custom WebPart like OOB SharePoint Property Panel via Reflection'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi08dF9FEArbhaF_Wy8kylSZR81Bt0YbSQ4icKhg0x9wQ_eF0brtnEpy-5c4YB-fkzBioabcQqmDJdHqznuGioN3yykfeC3ZsnExwPr2lfqQy8WMdj71sJEfFG4yBt9y1PosByXpHqpF9KF/s72-c/PropertyPanel.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-7343208920834408962</id><published>2011-10-17T20:23:00.000+05:30</published><updated>2011-10-17T20:23:48.601+05:30</updated><title type='text'>Display Unsupported Browser Error via OOB control in SharePoint</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #5a554e; font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;SharePoint 2010 will support many major browsers including IE7, IE8, FF3.5 and Safari4, but there is one browser that will not be supported by the out of the box SharePoint 2010 experience:&amp;nbsp;&lt;strong&gt;Internet Explorer 6&lt;/strong&gt;!&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #5a554e; font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #5a554e; font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; line-height: 19px;&quot;&gt;How&lt;span style=&quot;font-family: cour;&quot;&gt;&amp;nbsp;can we handle this gracefully? Microsoft again comes to the rescue with a SharePoint Control to help.&lt;/span&gt;&lt;/div&gt;&lt;blockquote style=&quot;line-height: 1.3em;&quot;&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;&amp;lt;SharePoint:WarnOnUnsupportedBrowsers runat=&quot;server&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; line-height: 19px;&quot;&gt;If you place this control at the bottom of your master page, IE6 users will be greeted with a message like this:&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; line-height: 19px;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHi0W6KhgKaIGgAX0XDPmREL9SU5kcVOICxQoTdIUFlzM7AVTeU9gmnY1aN4jQwcVNLVT0E19QRmEbbt1LKMvj6HniuCsqZxZYyIyMtprrzPKMFe1Dpx3Ggq1p8RFjSl_IjPKGjBYpf_4/s1600-h/image%5B15%5D.png&quot; style=&quot;color: #087bb4; text-decoration: underline;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;243&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9YVZvuuOLBwG9gmp3zIrzBHYmTijKArLiFJM3VExxw2CVZamutuFgky3wDjbM-pzpX1q__A_Oxc7up8kpeP2SPp-FDmDeMt94x-lcUx_C-PVAxMyPKqtvM7SdPu7oz9xn7sbwL2rwhdA/?imgmax=800&quot; style=&quot;border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: inline; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot; title=&quot;image&quot; width=&quot;490&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, &#39;Helvetica Neue&#39;, Arial, &#39;Lucida Sans Unicode&#39;, sans-serif; line-height: 19px;&quot;&gt;Happy Coding !!!!!&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/7343208920834408962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/7343208920834408962?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7343208920834408962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7343208920834408962'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/10/display-unsupported-browser-error-via.html' title='Display Unsupported Browser Error via OOB control in SharePoint'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9YVZvuuOLBwG9gmp3zIrzBHYmTijKArLiFJM3VExxw2CVZamutuFgky3wDjbM-pzpX1q__A_Oxc7up8kpeP2SPp-FDmDeMt94x-lcUx_C-PVAxMyPKqtvM7SdPu7oz9xn7sbwL2rwhdA/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-1737218682479871801</id><published>2011-10-11T18:17:00.000+05:30</published><updated>2011-10-11T18:17:07.026+05:30</updated><title type='text'>SPChangeQuery Class in SharePoint</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Segoe UI&#39;, Verdana, Arial; font-size: 13px;&quot;&gt;Gets the changes to the list from the change log as filtered by the specified query.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Segoe UI&#39;, Verdana, Arial; font-size: 13px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Segoe UI&#39;, Verdana, Arial; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;font-family: Consolas, Courier, monospace; font-style: normal; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; (SPSite siteCollection = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; SPSite(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;http://localhost&quot;&lt;/span&gt;))
         {
            &lt;span style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; (SPWeb webSite = siteCollection.OpenWeb())
            {
               &lt;span style=&quot;color: green;&quot;&gt;// Get a list.&lt;/span&gt;
               SPList list = webSite.Lists[0];

               &lt;span style=&quot;color: green;&quot;&gt;// Construct a query.&lt;/span&gt;
               SPChangeQuery query = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; SPChangeQuery(&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;,  &lt;span style=&quot;color: green;&quot;&gt;// limit object types&lt;/span&gt;
                                                       &lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;); &lt;span style=&quot;color: green;&quot;&gt;// limit change types&lt;/span&gt;

               &lt;span style=&quot;color: green;&quot;&gt;// Specify the object type. &lt;/span&gt;
               query.Item = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;

               &lt;span style=&quot;color: green;&quot;&gt;// Specify change types. &lt;/span&gt;
               query.Add = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;
               query.Delete = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;
               query.Update = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;

               SPTimeZone timeZone = webSite.RegionalSettings.TimeZone;
               &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; total = 0;

               &lt;span style=&quot;color: green;&quot;&gt;// Loop until we reach the end of the log.&lt;/span&gt;
               &lt;span style=&quot;color: blue;&quot;&gt;while&lt;/span&gt; (&lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;)
               {
                  SPChangeCollection changes = list.GetChanges(query);

                  total += changes.Count;

                  &lt;span style=&quot;color: green;&quot;&gt;// Print info about each change to the console.&lt;/span&gt;
                  &lt;span style=&quot;color: blue;&quot;&gt;foreach&lt;/span&gt; (SPChangeItem change &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; changes)
                  {
                     &lt;span style=&quot;color: green;&quot;&gt;// Get the item name.&lt;/span&gt;
                     &lt;span style=&quot;color: blue;&quot;&gt;string&lt;/span&gt; itemName = String.Empty;
                     SPListItem item = &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;;
                     &lt;span style=&quot;color: blue;&quot;&gt;try&lt;/span&gt;
                     {
                        item = list.GetItemByUniqueId(change.UniqueId);
                        itemName = item.Name;
                     }
                     &lt;span style=&quot;color: blue;&quot;&gt;catch&lt;/span&gt; (ArgumentException)
                     {
                        itemName = &lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Unknown&quot;&lt;/span&gt;;
                     }

                     Console.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nDate: {0}&quot;&lt;/span&gt;,
                         timeZone.UTCToLocalTime(change.Time).ToString());
                     Console.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Change: {0}&quot;&lt;/span&gt;, change.ChangeType);
                     Console.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Item: {0}&quot;&lt;/span&gt;, itemName);

                  }

                  &lt;span style=&quot;color: green;&quot;&gt;// Break out of loop if we have the last batch.&lt;/span&gt;
                  &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (changes.Count &amp;lt; query.FetchLimit)
                     &lt;span style=&quot;color: blue;&quot;&gt;break&lt;/span&gt;;

                  &lt;span style=&quot;color: green;&quot;&gt;// Otherwise, go get another batch.&lt;/span&gt;
                  query.ChangeTokenStart = changes.LastChangeToken;
               }

               Console.WriteLine(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nTotal of {0} changes to {1} list&quot;&lt;/span&gt;, total, list.Title);
            }
         }
         Console.Write(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;\nPress ENTER to continue...&quot;&lt;/span&gt;);
         Console.ReadLine();&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/1737218682479871801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/1737218682479871801?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1737218682479871801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1737218682479871801'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/10/spchangequery-class-in-sharepoint.html' title='SPChangeQuery Class in SharePoint'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-5889125950649045797</id><published>2011-09-29T10:56:00.000+05:30</published><updated>2011-09-29T10:56:35.137+05:30</updated><title type='text'>Migrate SharePoint List Data to Document Library without changing the Created and Modified Date</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&amp;nbsp;SPSecurity.RunWithElevatedPrivileges(delegate()&lt;br /&gt;
&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; using (SPSite site = new SPSite(&quot;http://br-pc-203/&quot;))&lt;br /&gt;
&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; SPList customList = site.RootWeb.Lists[&quot;Custom List&quot;];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPList documentLibrary = site.RootWeb.Lists[&quot;Document Library&quot;];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPFolder folder = site.RootWeb.Folders[documentLibrary.Title];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPFileCollection fileCollection = null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (SPListItem ltItem in customList.Items)&lt;br /&gt;
&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; &amp;nbsp; &amp;nbsp; if (ltItem.Attachments != null &amp;amp;&amp;amp; ltItem.Attachments.Count &amp;gt; 0)&lt;br /&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; {&lt;br /&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; foreach (String sFilename in ltItem.Attachments)&lt;br /&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;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fileCollection = folder.Files;&lt;br /&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; SPListItem docItem = documentLibrary.Items.Add();&lt;br /&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; SPFile attachmentFile = &amp;nbsp;ltItem.ParentList.ParentWeb.GetFile(ltItem.Attachments.UrlPrefix + sFilename);&lt;br /&gt;
&lt;br /&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; string destFile = fileCollection.Folder.Url + &quot;/&quot; + attachmentFile.Name;&lt;br /&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; byte[] fileData = attachmentFile.OpenBinary();&lt;br /&gt;
&lt;br /&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; SPFile addedFile = fileCollection.Add(destFile, fileData, site.RootWeb.CurrentUser, site.RootWeb.CurrentUser, Convert.ToDateTime(ltItem[SPBuiltInFieldId.Created]), Convert.ToDateTime(ltItem[SPBuiltInFieldId.Modified]));&lt;br /&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; SPListItem item = addedFile.Item;&lt;br /&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; item[SPBuiltInFieldId.Created] = Convert.ToDateTime(ltItem[SPBuiltInFieldId.Created]);&lt;br /&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; item[SPBuiltInFieldId.Modified] = Convert.ToDateTime(ltItem[SPBuiltInFieldId.Modified]);&lt;br /&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; addedFile.Item.Update();&lt;br /&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;
&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; &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;br /&gt;
&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; });&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/5889125950649045797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/5889125950649045797?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/5889125950649045797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/5889125950649045797'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/09/migrate-sharepoint-list-data-to.html' title='Migrate SharePoint List Data to Document Library without changing the Created and Modified Date'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-7566018825647304839</id><published>2011-09-18T20:49:00.000+05:30</published><updated>2011-09-18T20:49:44.763+05:30</updated><title type='text'>OOB Redirect Page for Display and Edit form of ListItem : COPYUTIL.ASPX provided by SharePoint</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
To navigate to a SharePoint list item or document, when you only got the ID&#39;s of the item, the item&#39;s container (list or document library) and the item&#39;s web? I sure did! For example when you query SharePoint data by making use of the SPSiteDataQuery class; the resulting data table includes all those ID&#39;s (and additional properties if you want), but it doesn&#39;t include a link back to the item. You could make use of the Object Model to build the link in code, but that is both resource intensive and pretty complex. In that case you have to check out the CopyUtil.aspx page, which is also used by the Content Query Web Part by the way. The CopyUtil.aspx page is an application page to which you can provide a bunch of ID&#39;s, as a result the page will redirect you to the corresponding item or document.&lt;br /&gt;
&lt;br /&gt;
You just have to build a URL like this (replace the X&#39;s with the actual ID&#39;s of course):&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;http://yoursite/_layouts/CopyUtil.aspx?Use=id&amp;amp;Action=dispform&amp;amp;ItemId=X&amp;amp;ListId=X&amp;amp;WebId=X&amp;amp;SiteId=X&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
And the CopyUtil.aspx page will do the rest!&lt;br /&gt;
&lt;br /&gt;
Action = &quot;dispform&quot; or Action = &quot;editform&quot;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/7566018825647304839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/7566018825647304839?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7566018825647304839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7566018825647304839'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/09/oob-redirect-page-for-display-and-edit.html' title='OOB Redirect Page for Display and Edit form of ListItem : COPYUTIL.ASPX provided by SharePoint'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-1003639933209477950</id><published>2011-09-17T10:48:00.002+05:30</published><updated>2011-09-17T10:49:59.962+05:30</updated><title type='text'>List filter with URL values SharePoin</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif;&quot;&gt;Did you know that you easily can filter your Sharepoint list or library with values in your URL? This means that you can create a “view” without really creating a view. To spice up your GUI you can for instance insert some graphical boxes above your document library view that filters with URL values. Last, but not least, you can use this method to filter the content of all web parts on a page, you are not limited to filter a view in a document library (after all, a view is just a web part on a .aspx page). You can filter on a built-in column, or a column you have created yourself.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif;&quot;&gt;Example:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif; font-size: x-small;&quot;&gt;&lt;span id=&quot;more-100&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://www.uccorner.com/wp-content/uploads/2010/03/urlfilterclick1.png&quot; style=&quot;color: #666666; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-102&quot; height=&quot;163&quot; src=&quot;http://www.uccorner.com/wp-content/uploads/2010/03/urlfilterclick1.png&quot; style=&quot;background-color: #f3f3f3; border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-top-style: solid; border-top-width: 1px; height: auto; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; max-width: 96%; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot; title=&quot;urlfilterclick&quot; width=&quot;143&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif;&quot;&gt;Here I have created a couple of links in the Qiuck Launch. The url for the first link could be:&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; overflow-x: auto; overflow-y: hidden; padding-bottom: 1.5em; width: 840px; word-wrap: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif;&quot;&gt;/Forms/AllItems.aspx?FilterField1=_ModerationStatus&amp;amp;FilterValue1=2&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif;&quot;&gt;I used a built in column (you will have to use the internal column name) in this example, if you use your own column you just use your columns initial name and the plain value. The filter sign next to the column name shows that you have made a regular filtering of the column. Ofcourse you can filter on multiple values and columns, I guess you can figure that out for yourself:)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://www.uccorner.com/wp-content/uploads/2010/03/pending.png&quot; style=&quot;color: #666666; font-weight: bold; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-103&quot; height=&quot;47&quot; src=&quot;http://www.uccorner.com/wp-content/uploads/2010/03/pending.png&quot; style=&quot;background-color: #f3f3f3; border-bottom-color: rgb(221, 221, 221); border-bottom-left-radius: 3px 3px; border-bottom-right-radius: 3px 3px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(221, 221, 221); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(221, 221, 221); border-top-left-radius: 3px 3px; border-top-right-radius: 3px 3px; border-top-style: solid; border-top-width: 1px; height: auto; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; max-width: 96%; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot; title=&quot;pending&quot; width=&quot;122&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif;&quot;&gt;&lt;br /&gt;
How do I know that “2″ equals “pending”? Apply the filter manually and check out the URL, you’ll se both the internal column name and the correct value to filter on.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;display: block; margin-bottom: 1em; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif;&quot;&gt;In other words, adding the following code to your URL makes your URL-filtering day in Sharepoint:&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; overflow-x: auto; overflow-y: hidden; padding-bottom: 1.5em; width: 840px; word-wrap: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: tahoma, arial, sans-serif;&quot;&gt;?FilterField1=ColumnName&amp;amp;FilterValue1=ValueToFilterOn&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/1003639933209477950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/1003639933209477950?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1003639933209477950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1003639933209477950'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/09/list-filter-with-url-values-sharepoin.html' title='List filter with URL values SharePoin'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-7563182451480412798</id><published>2011-09-10T11:53:00.000+05:30</published><updated>2011-09-10T11:53:48.071+05:30</updated><title type='text'>Reset the Farm Passphrase 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;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #333333; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 13px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 24px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Adding a new server to the farm and you can’t remember that new SharePoint 2010 addition called the Farm Passphrase? No problem! You can use PowerShell to reset / change that forgotten farm passphrase. Note that I said reset and not retrieve. There is currently no option to retrieve the existing farm passphrase.&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 24px; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Must be a member of the&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;SharePoint_Shell_Access&lt;/strong&gt;&amp;nbsp;database role on the SharePoint Configuration database. Check&amp;nbsp;&lt;a href=&quot;http://technet.microsoft.com/en-us/library/ff607830.aspx&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #0066cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Get-SPShellAdmin&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://technet.microsoft.com/en-us/library/ff607596.aspx&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #0066cc; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Add-SPShellAdmin&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Open the SharePoint 2010 Management Shell (Start &amp;gt; All Programs &amp;gt; Microsoft SharePoint 2010 Products &amp;gt; SharePoint 2010 Management Shell)&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Enter this at the PowerShell prompt:&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;$passphrase = ConvertTo-SecureString -asPlainText -Force&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Input the new passphrase and hit Enter&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Enter this at the PowerShell prompt:&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 0px; margin-left: 1.5em; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Set-SPPassPhrase -PassPhrase $passphrase -Confirm&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;You will be asked to confirm the passphrase by re-entering it&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Re-enter the passphrase and hit Enter&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;You will be asked if you are sure that you want to perform this action, type&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Y&lt;/strong&gt;&amp;nbsp;(for Yes) and hit Enter&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Georgia; font-size: 10pt; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Your farm passphrase has now been reset!&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 24px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://www.tcscblog.com/wp-content/uploads/2011/01/012011_1133_ResettheFar1.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; height: auto; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 640px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; width: auto;&quot; /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/7563182451480412798/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/7563182451480412798?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7563182451480412798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7563182451480412798'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/09/reset-farm-passphrase-in-sharepoint.html' title='Reset the Farm Passphrase in SharePoint 2010'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-6091711702724000972</id><published>2011-08-10T09:40:00.000+05:30</published><updated>2011-08-10T09:40:36.342+05:30</updated><title type='text'>Designing pages for quicker downloads (Page Optimization in SharePoint)</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;In an environment with limited network capacity, streamline your pages and make them as small and responsive as possible. There are different techniques to do this, most of which are not specific to SharePoint Products and Technologies. The general methods can be used on any Web site are not be discussed in great detail in this section. Instead, the section focuses on understanding the features included in SharePoint Products and Technologies, what is included in the page, and ways in which you can speed up the initial visit to a SharePoint site.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h3&gt;&lt;a href=&quot;&quot; name=&quot;_Toc222211547&quot;&gt;Page elements&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;&lt;div class=&quot;MsoNormal&quot;&gt;A page on a SharePoint site consists of several unique elements, as shown in the following figure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;TableSpacing&quot;&gt;When the page is rendered, it brings together the master page, the layout page, and content for the page. The page content includes the values for each of the page fields, but also a number of other elements such as the theme, style sheets, images, and navigation. The following table shows an example of the files and streams that are present in a single page from a SharePoint site. This example is a capture of all the HTTP requests that were made on an initial visit to the default home page of a collaboration portal site.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-bottom-style: none; border-collapse: collapse; border-color: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 5.05pt; width: 587px;&quot;&gt;&lt;thead&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; page-break-inside: avoid;&quot;&gt;    &lt;td style=&quot;background: #D9D9D9; border-bottom: 1.0pt; border-color: gray; border-left: 1.5pt; border-right: 1.0pt; border-style: solid; border-top: 1.5pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: gray; mso-border-left-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-style-alt: solid; mso-border-top-alt: 1.5pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;    &lt;div class=&quot;MsoNormal&quot; style=&quot;page-break-after: avoid;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 9.0pt;&quot;&gt;URL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;    &lt;td style=&quot;background: #D9D9D9; border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: solid gray 1.5pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: gray; mso-border-left-alt: .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: 1.5pt; mso-border-style-alt: solid; mso-border-top-alt: 1.5pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;    &lt;div class=&quot;MsoNormal&quot; style=&quot;page-break-after: avoid;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 9.0pt;&quot;&gt;Size (bytes)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;/thead&gt;  &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-irow: 1; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/topnavhover.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;96&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 2; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/Pages/Default.aspx&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;1656&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 3; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/Pages/Default.aspx&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;1539&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 4; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/Pages/Default.aspx&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;66084&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 5; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/styles/controls.css?rev=EhwiQKSLiI%2F4dGDs6DyUdQ%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;1448&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 6; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/styles/HtmlEditorCustomStyles.css?rev=8SKxtNx33FmoDhbbfB27UA%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;642&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 7; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/styles/HtmlEditorTableFormats.css?rev=guYGdUBUxQit03E2jhSdvA%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;1317&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 8; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/styles/core.css?rev=5msmprmeONfN6lJ3wtbAlA%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;13596&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 9; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/init.js?rev=VhAxGc3rkK79RM90tibDzw%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;15732&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 10; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/core.js?rev=F8pbQQxa4zefcW%2BW9E5g8w%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;54367&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 11; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/portal.js?rev=INhSs9mWTnUTqdwwIXYMaQ%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;954&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 12; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/ie55up.js?rev=Ni7%2Fj2ZV%2FzCvd09XYSSWvA%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;20508&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 13; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/search.js?rev=yqBjpvg%2Foi3KG5XVf%2FStmA%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;5092&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 14; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/1033/EditingMenu.js?rev=eh0f0CwzvHQ7Ii0JvdsIjQ%3D%3D&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;2735&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 15; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/WebResource.axd?d=__WrA1TRLicJgwGEmYKqSA2&amp;amp;t=633214754549731034&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;5383&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 16; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/WebResource.axd?d=h_u9v0Coj_eDqsvEkDrdtw2&amp;amp;t=633214754549731034&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;8258&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 17; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/blank.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;43&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 18; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/helpicon.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;1025&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 19; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/Menu1.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;68&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 20; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/titlegraphic.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;1299&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 21; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/gosearch.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;19933&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 22; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/WebResource.axd?d=puevA5kEAx44yxozBd-hspPZ9eA51Rh9u95VwVGLFCc1&amp;amp;t=633214754549731034&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;224&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 23; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/WebResource.axd?d=wyTuS1folQ6wX2Tc_7NOOaeElHHqL6rtdeAeRRUR36s1&amp;amp;t=633214754549731034&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;218&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 24; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/whitearrow.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;68&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 25; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/recycbin.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;1004&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 26; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/PublishingImages/newsarticleimage.jpg&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;10710&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 27; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/icongo01.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;1171&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 28; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/menudark.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;68&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 29; mso-yfti-lastrow: yes; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.5pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-bottom-alt: 1.5pt; mso-border-color-alt: gray; mso-border-left-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-style-alt: solid; mso-border-top-alt: .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 394.3pt;&quot; valign=&quot;top&quot; width=&quot;526&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;http://myServer/_layouts/images/topnavhover.gif&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.5pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 46.3pt;&quot; valign=&quot;top&quot; width=&quot;62&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;96&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Note the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;A total of 29 requests were required to download the page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;The total page size was 235 kilobytes (KB).&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;This represents the initial page load; almost all of the items in the request have a caching directive that instructs the browser not to load them again for one year. The second and subsequent page loads produce only three requests. Of those, two are part of the NTLM negotiation that occurs, so only one item is actually downloaded—the HTML for the page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;The default IIS Compression level 0 was used, which is the least amount of compression possible. Additional compression would result in even smaller download sizes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Of the different file types loaded, there were:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList2&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;4.axd resource requests&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList2&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;4.css resource requests&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList2&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;12 image resource requests&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList2&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;6.js resource requests (several of which were duplicates)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList2&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;3 page resource requests for default.aspx (two of which are part of the NTLM negotiation)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Most of these file types are fairly obvious, with the possible exception being the.axd resource type. An.axd resource is part of a new feature in ASP.NET version 2.0. A developer can add a resource, such as script file or style sheet, to a control. In the control, the developer uses the &lt;span class=&quot;Bold&quot;&gt;ClientScript&lt;/span&gt; class to include a method called &lt;span class=&quot;Bold&quot;&gt;GetWebResourceUrl&lt;/span&gt;. When the control is rendered at runtime, it dynamically generates a URL for the resource. The resource itself is compiled into the control assembly, so this methodology provides a way to stream that resource out of the assembly and down to the client just as if it were a separate file located on the Web server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Knowing the resource requests used by the page can help you understand where and how optimizations can be applied. You can measure this kind of information by using a variety of different tools and techniques. For this article, a freeware tool called &lt;a href=&quot;http://go.microsoft.com/fwlink/?LinkId=108593&amp;amp;clcid=0x409&quot;&gt;Fiddler&lt;/a&gt; (&lt;i&gt;http://go.microsoft.com/fwlink/?LinkId=108593&amp;amp;clcid=0x409&lt;/i&gt;) was used. Fiddler can be run on a client workstation and tracks all of the HTTP requests being made for a page. It then displays the results in a grid.&lt;/div&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;As you change your site to optimize it, test it with Fiddler. To get the most accurate idea of what items are being requested, what items are being cached, and the size of each item:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;1.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Delete all of your browser&#39;s temporary files.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;2.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Start Fiddler.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;3.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Request your page. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;AlertLabelinList1&quot;&gt;Note: &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;AlertTextinList1&quot;&gt;Be sure that you request the page by clicking a link. If you just click the Refresh button, the system automatically requests items again and won&#39;t accurately reflect any optimization changes that have been made.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h3&gt;&lt;a href=&quot;&quot; name=&quot;_Toc222211548&quot;&gt;Optimizing Page Downloads&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/h3&gt;&lt;div class=&quot;MsoNormal&quot;&gt;After you understand the composition of the page, you can use different methods to optimize the download experience for that page. In general, the goal is to minimize the number of round trips between client computers and server computers and to reduce the amount of data that goes over the network. The guidance in this article includes recommendations that can be applied broadly to a variety of different implementations of SharePoint Products and Technologies. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;There is an important distinction to remember when reviewing these recommendations and when reviewing any other custom optimizations that you might develop. You categorize page optimization techniques into one of two categories: first page request and subsequent page request. Optimizations for the first page request are those kinds of optimizations that are implemented the first time the page is requested, but that don&#39;t necessarily affect subsequent page requests. Subsequent page request optimizations are those that can improve the user experience whether it is the first time a user requests the page or the fiftieth time. The key is that you need to balance loss in functionality against the gain achieved. If gain is only realized the first time a user hits a site, the optimization might not be worth the loss in functionality.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h4&gt;BLOB cache&lt;o:p&gt;&lt;/o:p&gt;&lt;/h4&gt;&lt;div class=&quot;MsoNormal&quot;&gt;The binary large object (BLOB) cache is discussed in more detail later in this article. In short, it can be used to apply cache directives to items on a page that are stored in SharePoint Products and Technologies. If those cache directives are included, the browser won&#39;t try to download those items again until the cached item expires. As was illustrated with the previous home page example, almost all of the items included in the default home page for the Collaboration Portal site template had a caching directive associated with them, which is why they were not requested on subsequent page hits. &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h4&gt;64-bit hardware&lt;/h4&gt;&lt;h4&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/h4&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Hardware choices in the farm can affect the latency of requests as well. 32-bit systems have a memory limit of 2 gigabytes (GB) of RAM per application. Although you can extend application support to 3 GB of RAM, SharePoint Products and Technologies do not support using the &lt;span class=&quot;System&quot;&gt;&lt;span style=&quot;border: none;&quot;&gt;&lt;span style=&quot;border: none;&quot;&gt;/3GB&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; switch. Low memory situations can negatively affect the request latency in the following ways:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;If the amount of memory becomes constrained, it can cause the SharePoint application pool to recycle. That forces the ASP.NET application domain to recycle as well, which can cause a long delay in responding to user requests. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Out-of-memory errors can cause the BLOB cache to stop serving content. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;By using 64-bit hardware, you can ensure that you can allocate and use enough RAM to prevent these errors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h4&gt;Web garden settings&lt;o:p&gt;&lt;/o:p&gt;&lt;/h4&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Web garden settings can also inadvertently cause the BLOB cache to work inconsistently. Because only one process can acquire the lock necessary to manage the cache, successful use the cache depends on which thread services a request. If a Web garden that does not have the BLOB cache lock services a request, the content it sends in response will not have caching directives associated with it. That increases both the number of requests and the amount of the data sent over the network. Therefore, if you intend to use the BLOB cache, you should not use Web gardens.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h4&gt;Minimize secured items on the page&lt;o:p&gt;&lt;/o:p&gt;&lt;/h4&gt;&lt;div class=&quot;MsoNormal&quot;&gt;When a user authenticates to SharePoint Products and Technologies, two things happen. First, the system validates credentials to determine who the user is. Second, the role provider enumerates the list of SharePoint groups to which the user belongs. Each time a page is requested, the role provider is called again to enumerate all of the groups to which the user belongs. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;However, this call for group membership can happen multiple times on a single page. For example, the default Collaboration Portal site template page requires two calls to the role provider when you go to the home page—one for the page itself and one for the image on the page. Each image that is stored in a SharePoint library and is on the page will force an additional call to the role provider to verify permissions, even if all of the images are stored in the same image library. That verification occurs whether the images are added as fields on the page—that is, part of the page&#39;s content—or whether they are added to the master page for the site. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;A site developed for a limited bandwidth or high latency environment should be designed to minimize the number of images used on the page. Many sites use several images as part of the master page to create different visual effects. Because the latency will increase with the increased number of security checks, design sites for these environments by using as few images as possible.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h4&gt;Minimizing the number and size of images&lt;o:p&gt;&lt;/o:p&gt;&lt;/h4&gt;&lt;div class=&quot;MsoNormal&quot;&gt;As described in the previous section, you should minimize the number of images in your site. To help with that effort, you can embed multiple images in a single file and then reference individual images in your page. Not only will file download size decrease, but fewer files result in less network traffic. It is more complicated to author pages by using this technique, but in situations where every round trip and file size counts, it can prove to be valuable way to help improve performance. &amp;nbsp;&lt;/div&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;The following figure shows how this image is subsequently changed to display as individual pictures in a table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Manipulation of the images was done entirely through style sheet classes. There were two primary classes used in &lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;div&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;img&lt;/span&gt;&lt;/span&gt; elements in each table cell. Those classes are as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;.cluster {&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;height:50px;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;position:relative;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;width:50px;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;.cluster img {&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;position:absolute;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&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;Each image has a class associated with it based on the identifier (ID) for the image. That style clips the picture and defines an offset from the initial picture in the cluster. Those classes are as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;#person {&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;border:none;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;clip:rect(0, 49, 49, 0);&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;#keys {&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;clip:rect(0, 99, 49, 50);&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;left:-50px;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;#people {&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;clip: rect(0, 149, 49, 100);&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;left:-100px;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;#lock {&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;clip:rect(0, 199, 49, 150);&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;left:-150px;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;#phone {&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;clip:rect(0,249, 49, 200);&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;left:-200px;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;#question {&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;clip:rect(0, 299, 49, 250);&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;left:-250px;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&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;The HTML for the table includes the &lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;div&lt;/span&gt;&lt;/span&gt; and &lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;img&lt;/span&gt;&lt;/span&gt; tags with the appropriate ID values and class names, as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;lt;table border=&quot;1&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;&amp;lt;div class=&quot;cluster&quot;&amp;gt;&amp;lt;img id=&quot;person&quot; src=&quot;Icons50x50.gif&quot; width=&quot;300&quot; height=&quot;50&quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;&amp;lt;div class=&quot;cluster&quot;&amp;gt;&amp;lt;img id=&quot;keys&quot; src=&quot;Icons50x50.gif&quot; width=&quot;300&quot; height=&quot;50&quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;&amp;lt;div class=&quot;cluster&quot;&amp;gt;&amp;lt;img id=&quot;people&quot; src=&quot;Icons50x50.gif&quot; width=&quot;300&quot; height=&quot;50&quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;&amp;lt;div class=&quot;cluster&quot;&amp;gt;&amp;lt;img id=&quot;lock&quot; src=&quot;Icons50x50.gif&quot; width=&quot;300&quot; height=&quot;50&quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;&amp;lt;div class=&quot;cluster&quot;&amp;gt;&amp;lt;img id=&quot;phone&quot; src=&quot;Icons50x50.gif&quot; width=&quot;300&quot; height=&quot;50&quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;&amp;lt;div class=&quot;cluster&quot;&amp;gt;&amp;lt;img id=&quot;question&quot; src=&quot;Icons50x50.gif&quot; width=&quot;300&quot; height=&quot;50&quot;/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/span&gt;&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;Multiple Microsoft Web properties and products now use this technique, including the Microsoft Passport Network and Microsoft Office Outlook Web Access (OWA). The MSN team has conducted some performance tests to analyze the impact of the changes and has seen a load time improvement for the first page of 50 to 75 percent.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;There is an important point to consider if you are authoring your pages in Microsoft Office SharePoint Designer 2007. When you create a new page in Office SharePoint Designer 2007, it automatically adds the following XHTML schema markup to the page:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;It then adds this namespace to the HTML element:&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&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;If you use this schema, the images will not line up correctly. You must remove the &lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;xmlns&lt;/span&gt;&lt;/span&gt; attribute from the HTML tag in order to make the images appear as intended.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h4&gt;Delay downloading core.js&lt;o:p&gt;&lt;/o:p&gt;&lt;/h4&gt;&lt;div class=&quot;MsoNormal&quot;&gt;The main client script file included with Office SharePoint Server 2007 is called core.js. It is the largest script file at approximately 257 KB uncompressed, and approximately 54 KB compressed. In certain situations, you may be able to delay the downloading of core.js. When you do that, the page renders more quickly because the core.js file does not start downloading until the page has been opened in the browser. That enables the user to view the page and start reading the content sooner. This technique is most useful in an Internet scenario with anonymous users. Conversely, authenticated users need to have core.js downloaded at page load time for such functionality or UI elements as the &lt;span class=&quot;UI&quot;&gt;Site Actions&lt;/span&gt; menu. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;You can use the following steps to implement this technique. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;1.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Create a custom layout page that doesn&#39;t use core.js. This layout page will be used with the home page so initial visitors to the site will not have to wait for core.js to download immediately. It needs to be compatible with the existing home page, so the new layout page should be have the same associated content type as the layout page currently in use. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;AlertLabelinList1&quot;&gt;&lt;span&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape
 id=&quot;Picture_x0020_121&quot; o:spid=&quot;_x0000_i1030&quot; type=&quot;#_x0000_t75&quot; style=&#39;width:18pt;
 height:12pt;visibility:visible&#39;&gt;  &lt;v:imagedata src=&quot;file:///C:\Users\RAHULS~1\AppData\Local\Temp\OICE_2342D3C9-17E7-428D-9A7F-F99CF75E1E12.0\msohtmlclip1\01\clip_image004.gif&quot;
  o:title=&quot;&quot;/&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img border=&quot;0&quot; height=&quot;16&quot; src=&quot;file:///C:/Users/RAHULS~1/AppData/Local/Temp/OICE_2342D3C9-17E7-428D-9A7F-F99CF75E1E12.0/msohtmlclip1/01/clip_image004.gif&quot; v:shapes=&quot;Picture_x0020_121&quot; width=&quot;24&quot; /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;Note: &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;AlertTextinList1&quot;&gt;By default, in a Collaboration Portal site, the Welcome Page content type is specified.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;2.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Add the following tag to the page: &lt;span class=&quot;UserInputNon-localizable&quot;&gt;&amp;lt;SharePointWebControls:ScriptLink runat=&quot;server&quot;/&amp;gt;&lt;/span&gt;. This instructs the system to not use core.js unless it is referenced.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;3.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Create a custom control to check for authenticated users. The control will be very simple, and essentially contains the following code (shown in C#):&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;CodeinList1&quot;&gt;if (HttpContext.Current.Request.IsAuthenticated)&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Microsoft.SharePoint.WebControls.ScriptLink.RegisterCore(this.Page, true);&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;4.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;On each Web server, put the control in the Global Assembly Cache (GAC), and then add a &lt;span class=&quot;CodeEmbedded&quot;&gt;&lt;span&gt;SafeControl&lt;/span&gt;&lt;/span&gt; entry for it in the Web.config file for the Web application in which it will be used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;5.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Add the custom control to the custom layout page created in step 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;6.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Add an IFRAME to the layout page. It should reference a page that has the following content:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;CodeinList1&quot;&gt;&amp;lt;body&amp;gt; &amp;lt;SharePoint:ScriptLink name=&quot;core.js&quot; runat=&quot;server&quot; /&amp;gt; &amp;lt;script language=&quot;javascript&quot;&amp;gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;DisableRefreshOnFocus(); &amp;lt;/script&amp;gt; &amp;lt;/body&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;7.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Check in the custom layout page and publish it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;NumberedList1&quot;&gt;8.&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Base the home page for the site on the new layout page. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;After you perform the preceding steps, test the home page for the site to verify that it works. A first-time anonymous user should not see a reference to core.js in the page source, but it should end up in browser cache.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Additionally, consider the following before employing this technique:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;The site master page and the system master page must be different; otherwise, all pages in _layouts would not work right.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Ensure that the master page doesn&#39;t contain any controls that require core.js at load time to work.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Ensure that the master page doesn&#39;t have any &lt;span class=&quot;Bold&quot;&gt;ScriptLink&lt;/span&gt; controls that load or reference core.js. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;For additional details and sample code, see the &lt;a href=&quot;http://go.microsoft.com/fwlink/?LinkId=106008&amp;amp;clcid=0x409&quot;&gt;Microsoft Enterprise Content Management (ECM) Team Blog&lt;/a&gt; (&lt;i&gt;http://go.microsoft.com/fwlink/?LinkId=106008&amp;amp;clcid=0x409&lt;/i&gt;).&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;h4&gt;Optimizing list view pages&lt;o:p&gt;&lt;/o:p&gt;&lt;/h4&gt;&lt;div class=&quot;MsoNormal&quot;&gt;The Microsoft Services team has worked to quantify and improve the performance of list view page rendering times. A list view page is the AllItems.aspx page that is used by each list and library to enable browsing of content. The rendering time of that page can vary widely based on how many columns are visible in the view and what format they are. For example, display options and enabling presence icons can greatly affect rendering time. Group Collapsed took significantly longer than Group Expanded to render, and both of those were slower than no grouping at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;These sorts of nuances are why it&#39;s important to carefully consider how views are constructed in list view pages, especially over slow network links. When working with lists that contain a lot of data, it&#39;s important to carefully tailor all views, especially the default view. In general, you can speed up the rendering time of list view pages by:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Showing fewer columns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Excluding any columns that include presences information.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;BulletedList1&quot;&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;·&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Using a link (but no edit menu) to view the item details.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;The following table describes customizations that reduce the time required for a view to render.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 5.05pt; mso-border-alt: solid gray 1.5pt; mso-border-insideh: .75pt solid gray; mso-border-insidev: .75pt solid gray; mso-padding-alt: 0in 4.3pt 0in 4.3pt; mso-yfti-tbllook: 480; width: 100.0%;&quot;&gt;&lt;thead&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; page-break-inside: avoid;&quot;&gt;    &lt;td style=&quot;background: #D9D9D9; border-bottom: 1.0pt; border-color: gray; border-left: 1.5pt; border-right: 1.0pt; border-style: solid; border-top: 1.5pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: gray; mso-border-left-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-style-alt: solid; mso-border-top-alt: 1.5pt; padding: 0in 4.3pt 0in 4.3pt; width: 49.98%;&quot; valign=&quot;top&quot; width=&quot;49%&quot;&gt;    &lt;div class=&quot;MsoNormal&quot; style=&quot;page-break-after: avoid;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 9.0pt;&quot;&gt;Item&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;    &lt;td style=&quot;background: #D9D9D9; border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: solid gray 1.5pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: gray; mso-border-left-alt: .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: 1.5pt; mso-border-style-alt: solid; mso-border-top-alt: 1.5pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.02%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;    &lt;div class=&quot;MsoNormal&quot; style=&quot;page-break-after: avoid;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 9.0pt;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;/thead&gt;  &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-irow: 1; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 49.98%;&quot; valign=&quot;top&quot; width=&quot;49%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;View type&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.02%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Create a view as a datasheet view instead of a standard   view.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 2; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 49.98%;&quot; valign=&quot;top&quot; width=&quot;49%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;View: Item Limit&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.02%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Anything over 1,000 will likely render slowly. Over a slow   connection it&#39;s important to experiment to find the right balance between the   quantity of data shown at a time and the number of round trips necessary to   view all the data. The more rows that are shown at a time, the fewer round   trips, but larger pages.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 3; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 49.98%;&quot; valign=&quot;top&quot; width=&quot;49%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;View: Filter&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.02%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Use [Today] and [Me] to filter items by freshness or   assignment. Use Status fields to show only active items in default views.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 4; mso-yfti-lastrow: yes; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.5pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-bottom-alt: 1.5pt; mso-border-color-alt: gray; mso-border-left-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-style-alt: solid; mso-border-top-alt: .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 49.98%;&quot; valign=&quot;top&quot; width=&quot;49%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;View: Columns&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.5pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.02%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Use as few columns as necessary. Create a default view   with few columns that allows high-level browsing after which people can drill   down.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;The following table describes customizations that will increase the time required for a view to render. Each additional column increases rendering time by a slight amount: up to a half-second per column over a fast network connection for a list of 1,000 items. Some columns cost more, as noted in the table.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 5.05pt; mso-border-alt: solid gray 1.5pt; mso-border-insideh: .75pt solid gray; mso-border-insidev: .75pt solid gray; mso-padding-alt: 0in 4.3pt 0in 4.3pt; mso-yfti-tbllook: 480; width: 100.0%;&quot;&gt;&lt;thead&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; page-break-inside: avoid;&quot;&gt;    &lt;td style=&quot;background: #D9D9D9; border-bottom: 1.0pt; border-color: gray; border-left: 1.5pt; border-right: 1.0pt; border-style: solid; border-top: 1.5pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: gray; mso-border-left-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-style-alt: solid; mso-border-top-alt: 1.5pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.0%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;    &lt;div class=&quot;MsoNormal&quot; style=&quot;page-break-after: avoid;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 9.0pt;&quot;&gt;Item&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;    &lt;td style=&quot;background: #D9D9D9; border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: solid gray 1.5pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: gray; mso-border-left-alt: .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: 1.5pt; mso-border-style-alt: solid; mso-border-top-alt: 1.5pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.0%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;    &lt;div class=&quot;MsoNormal&quot; style=&quot;page-break-after: avoid;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 9.0pt;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;/thead&gt;  &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-irow: 1; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.0%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Group By&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.0%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Grouping adds HTML and JScript, slowing down rendering for   large lists. Making all groups collapsed by default actually increases   rendering time further because of additional operations on the browser object   model.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 2; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.0%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Column – title linked to item with edit menu&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-alt: solid gray .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: solid gray 1.5pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.0%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;The option &quot;linked to item with edit menu&quot; takes   the longest; the similar option &quot;linked to item&quot; does not increase   rendering time noticeably.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 3; mso-yfti-lastrow: yes; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.5pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-bottom-alt: 1.5pt; mso-border-color-alt: gray; mso-border-left-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-style-alt: solid; mso-border-top-alt: .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.0%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Column – Lookup User with Presence&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.5pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.0%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Adding a user lookup field with presence adds HTML for   each link to open the presence menu. In addition it also uses bandwidth to   determine presence availability.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;The following table describes customizations that have a relatively small impact on the time required for a view to render.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;TableSpacing&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: 5.05pt; mso-border-alt: solid gray 1.5pt; mso-border-insideh: .75pt solid gray; mso-border-insidev: .75pt solid gray; mso-padding-alt: 0in 4.3pt 0in 4.3pt; mso-yfti-tbllook: 480; width: 100.0%;&quot;&gt;&lt;thead&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0; page-break-inside: avoid;&quot;&gt;    &lt;td style=&quot;background: #D9D9D9; border-bottom: 1.0pt; border-color: gray; border-left: 1.5pt; border-right: 1.0pt; border-style: solid; border-top: 1.5pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: gray; mso-border-left-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-style-alt: solid; mso-border-top-alt: 1.5pt; padding: 0in 4.3pt 0in 4.3pt; width: 49.98%;&quot; valign=&quot;top&quot; width=&quot;49%&quot;&gt;    &lt;div class=&quot;MsoNormal&quot; style=&quot;page-break-after: avoid;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 9.0pt;&quot;&gt;Item&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;    &lt;td style=&quot;background: #D9D9D9; border-bottom: solid gray 1.0pt; border-left: none; border-right: solid gray 1.5pt; border-top: solid gray 1.5pt; mso-border-bottom-alt: .5pt; mso-border-color-alt: gray; mso-border-left-alt: .75pt; mso-border-left-alt: solid gray .75pt; mso-border-right-alt: 1.5pt; mso-border-style-alt: solid; mso-border-top-alt: 1.5pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.02%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;    &lt;div class=&quot;MsoNormal&quot; style=&quot;page-break-after: avoid;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 9.0pt;&quot;&gt;Description&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;/thead&gt;  &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-irow: 1; mso-yfti-lastrow: yes; page-break-inside: avoid;&quot;&gt;   &lt;td style=&quot;border-bottom: solid gray 1.5pt; border-left: solid gray 1.5pt; border-right: solid gray 1.0pt; border-top: none; mso-border-bottom-alt: 1.5pt; mso-border-color-alt: gray; mso-border-left-alt: 1.5pt; mso-border-right-alt: .75pt; mso-border-style-alt: solid; mso-border-top-alt: .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 49.98%;&quot; valign=&quot;top&quot; width=&quot;49%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Sort, Totals&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid gray 1.5pt; border-left: none; border-right: solid gray 1.5pt; border-top: none; mso-border-left-alt: solid gray .75pt; mso-border-top-alt: solid gray .75pt; padding: 0in 4.3pt 0in 4.3pt; width: 50.02%;&quot; valign=&quot;top&quot; width=&quot;50%&quot;&gt;   &lt;div class=&quot;MsoNormal&quot;&gt;Applying multiple sorts and totals will increase the   rendering time by a noticeable amount, but each one typically costs less than   a second for a list of 1,000 items.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/6091711702724000972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/6091711702724000972?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/6091711702724000972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/6091711702724000972'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/08/designing-pages-for-quicker-downloads.html' title='Designing pages for quicker downloads (Page Optimization in SharePoint)'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-5376423593608505897</id><published>2011-08-08T22:16:00.000+05:30</published><updated>2011-08-08T22:16:04.734+05:30</updated><title type='text'>Relevant Documents WebPart in SharePoint 2010</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;SharePoint 2010 has introduced new webpart named &quot;Relevant Documents&quot;. Sometimes we have a&amp;nbsp;scenario where&amp;nbsp;we need to show all those document which is checked out to me from the site or we need to show all those document which last modified or created by me. This webpart is not part of MOSS 2007 so lots of users who are in new in SharePoint 2010 does not know about this webpart. My this post will show how to configure this webpart.&lt;br /&gt;
&lt;br /&gt;
Step 1. Add Relevant Documents webpart in your page&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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhydpByc9EiKB1xErUf-cz8RZKRviRBjpjzKSWYWvX4IKRseATjwJYCx6x_f0DrmTmtyfEB3gQJyGJ1IdLd0fBELoej52bA8zVY4UK8v0V4tu_vs2okPpeKsCAUfi0oepnOewb_-PUgbVyQ/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;194&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhydpByc9EiKB1xErUf-cz8RZKRviRBjpjzKSWYWvX4IKRseATjwJYCx6x_f0DrmTmtyfEB3gQJyGJ1IdLd0fBELoej52bA8zVY4UK8v0V4tu_vs2okPpeKsCAUfi0oepnOewb_-PUgbVyQ/s640/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;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Step 2: Edit the WebPart&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/AVvXsEi2lGhvtN6Mc-YeM-YglBkNCh9lnZoUUaxSWffV-KmlH43KXxUwSLZC1amWHPqxtLknU4Kg4d6eA-okQebdBNJrruKA4rC_SPS-NV0X-NDlbtzTfW420ljn2JxdWU9yEgiXHGQ7-NEQfOsi/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;176&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2lGhvtN6Mc-YeM-YglBkNCh9lnZoUUaxSWffV-KmlH43KXxUwSLZC1amWHPqxtLknU4Kg4d6eA-okQebdBNJrruKA4rC_SPS-NV0X-NDlbtzTfW420ljn2JxdWU9yEgiXHGQ7-NEQfOsi/s640/2.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Step 3: Click on the properties which you want to include in the result&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/AVvXsEi_gHMUXjLJ3VLaAMmXcji1ZpiZERuCnLhpN_gOgjIDIWxDZ3B_-1Y2z7i3kA5mrlkfP67YpfoOrNLxxsb_K4cRrRHtKZ5fCu92241SdLstrZK5f41PVuwWHQFm0eCk5IPojUg0mo7LRyKP/s1600/3.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/AVvXsEi_gHMUXjLJ3VLaAMmXcji1ZpiZERuCnLhpN_gOgjIDIWxDZ3B_-1Y2z7i3kA5mrlkfP67YpfoOrNLxxsb_K4cRrRHtKZ5fCu92241SdLstrZK5f41PVuwWHQFm0eCk5IPojUg0mo7LRyKP/s640/3.jpg&quot; width=&quot;330&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Results:&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/AVvXsEjj6Rw64UoplPe8mrcOUEpqenwK1XAMWjUXO3sSMy6MsX0L6i0GRpfSEd2apSV1NqgYxln1HLbL9oplnAvhPqKkWL_YW-HQE1jvqNloIbki9YrN3__hs2vuKGx_rztFoKgHLhcmuI3CZZJ1/s1600/4.jpg&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/AVvXsEjj6Rw64UoplPe8mrcOUEpqenwK1XAMWjUXO3sSMy6MsX0L6i0GRpfSEd2apSV1NqgYxln1HLbL9oplnAvhPqKkWL_YW-HQE1jvqNloIbki9YrN3__hs2vuKGx_rztFoKgHLhcmuI3CZZJ1/s640/4.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Done !!!&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Happy Coding !!!!!&lt;/div&gt;&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&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/5376423593608505897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/5376423593608505897?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/5376423593608505897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/5376423593608505897'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/08/relevant-documents-webpart-in.html' title='Relevant Documents WebPart in SharePoint 2010'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhydpByc9EiKB1xErUf-cz8RZKRviRBjpjzKSWYWvX4IKRseATjwJYCx6x_f0DrmTmtyfEB3gQJyGJ1IdLd0fBELoej52bA8zVY4UK8v0V4tu_vs2okPpeKsCAUfi0oepnOewb_-PUgbVyQ/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-1800685735440507980</id><published>2011-08-07T19:34:00.000+05:30</published><updated>2011-08-07T19:34:45.616+05:30</updated><title type='text'>Add Custom word in Spell Checker Dictionary for Site Collection</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;b&gt;Add Custom word in Spell Checker Dictionary for Site Collection&lt;/b&gt;&lt;br /&gt;
To create a custom dictionary to supplement the dictionaries included in SharePoint,&lt;br /&gt;
1. Create a document library named “Spelling” in the top-level site of your portal’s site collection.&lt;br /&gt;
2. Create &quot;Custom Dictionary.txt&quot; on your desktop.&lt;br /&gt;
3. Add desired word(s) on new line and Save the file&lt;br /&gt;
4. Upload a text file named “Custom Dictionary.txt”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;1. Only one Custom Dictionary.txt file is supported for a site collection.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;2. Words of any language supported by your site can be added to the Custom Dictionary.txt file.&lt;br /&gt;
&lt;br /&gt;
Done !!!&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://sharepointarrow.blogspot.com/feeds/1800685735440507980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/1800685735440507980?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1800685735440507980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1800685735440507980'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/08/add-custom-word-in-spell-checker.html' title='Add Custom word in Spell Checker Dictionary for Site Collection'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-8401925436267082899</id><published>2011-08-07T15:15:00.000+05:30</published><updated>2011-08-07T15:15:19.518+05:30</updated><title type='text'>Export a SharePoint Designer workflow to Visual Studio 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;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: Verdana, Geneva, sans-serif; font-size: 12px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Common situation when designing workflow is that you start to design workflow in SharePoint Designer and then you want to add some code in Visual Studio.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;In the following example, I will go through the procedure to create a workflow in SharePoint Designer and then open it and deploy it from Visual Studio.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Let’s start by creating a reusable workflow in SharePoint Designer&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;img alt=&quot;scl4&quot; border=&quot;0&quot; height=&quot;102&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl4_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl4&quot; width=&quot;59&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Enter the workflow information&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl5.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl5&quot; border=&quot;0&quot; height=&quot;247&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl5_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl5&quot; width=&quot;359&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;and then just implement one step to set the document status to approve:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl6.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl6&quot; border=&quot;0&quot; height=&quot;96&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl6_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl6&quot; width=&quot;485&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Next, in order to be able to reuse it in all the sites from site collection in SharePoint, publish the workflow globally:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl17.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl17&quot; border=&quot;0&quot; height=&quot;128&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl17_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl17&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Save the workflow and then Save it as a template :&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl8.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl8&quot; border=&quot;0&quot; height=&quot;75&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl8_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl8&quot; width=&quot;56&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;You should see the confirmation :&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl7.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl7&quot; border=&quot;0&quot; height=&quot;92&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl7_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl7&quot; width=&quot;244&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Now, if you go to the Site Library, you will see this:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl9.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl9&quot; border=&quot;0&quot; height=&quot;125&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl9_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl9&quot; width=&quot;443&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Save the .wsp localy and then, open Visual Studio and choose to import a workflow:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl10.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl10&quot; border=&quot;0&quot; height=&quot;246&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl10_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl10&quot; width=&quot;458&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;You can deploy it as a sandbox:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl111.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl11&quot; border=&quot;0&quot; height=&quot;303&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl11_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl11&quot; width=&quot;384&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;and select your .wsp and all the elements included in the .wsp:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/image8.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;322&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/image_thumb8.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;406&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Wait for importation to be completed:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl12.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl12&quot; border=&quot;0&quot; height=&quot;99&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl12_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl12&quot; width=&quot;366&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Then deploy the solution:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl13.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl13&quot; border=&quot;0&quot; height=&quot;86&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl13_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl13&quot; width=&quot;421&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;If you have already saved it in SharePoint Designer, you will have a conflict and see this:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/image9.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;283&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/image_thumb9.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;image&quot; width=&quot;408&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Just select Resolve Automatically to delete the workflow deployed by SharePoint Designer.&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;From the website, you should now see that the feature corresponding to this workflow is activated:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl14.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl14&quot; border=&quot;0&quot; height=&quot;27&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl14_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl14&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Then add the workflow on a document library:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl16.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl16&quot; border=&quot;0&quot; height=&quot;296&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl16_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl16&quot; width=&quot;426&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Then, start a workflow on a document:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl18.png&quot; style=&quot;color: #5c7a99; text-decoration: none;&quot;&gt;&lt;img alt=&quot;scl18&quot; border=&quot;0&quot; height=&quot;250&quot; src=&quot;http://pascalbonheur.com/wp-content/uploads/2010/02/scl18_thumb.png&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; display: inline;&quot; title=&quot;scl18&quot; width=&quot;323&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/8401925436267082899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/8401925436267082899?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8401925436267082899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8401925436267082899'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/08/export-sharepoint-designer-workflow-to.html' title='Export a SharePoint Designer workflow to Visual Studio in SharePoint 2010'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-8343258923935722862</id><published>2011-08-07T02:05:00.000+05:30</published><updated>2011-08-07T02:05:02.227+05:30</updated><title type='text'>Custom Sequential Approval Workflow via Visual Studio 2010</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;My 3rd and most important contribution to Codeplex. Recently I need to work on some custom approval workflow. I didn’t get much help on net on Workflows. So I have create Custom Sequential Approval Workflow via Visual Studio 2010 and&amp;nbsp;&amp;nbsp;thought its nice to contribute on codeplex with that project which can help everyone, following are the screen shots of the workflow.&amp;nbsp;&lt;a href=&quot;http://sequentialworkflow.codeplex.com/&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_19&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-1.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-19&quot; height=&quot;285&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-1.jpg?w=630&amp;amp;h=285&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Upload Document in Document Library&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Upload Document in Document Library&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_20&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step2.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-20&quot; height=&quot;216&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step2.jpg?w=630&amp;amp;h=216&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Check Workflow column is In Process&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Check Workflow column is In Process&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_21&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step3.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-21&quot; height=&quot;216&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step3.jpg?w=630&amp;amp;h=216&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Task is created in Task List&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Task is created in Task List&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_22&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step4.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-22&quot; height=&quot;347&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step4.jpg?w=630&amp;amp;h=347&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Click on Task will open the OOB Approval form Popup&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Click on Task will open the OOB Approval form Popup&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_23&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step5.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-23&quot; height=&quot;243&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step5.jpg?w=630&amp;amp;h=243&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Check Task list , Task is Approved and Completed&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Check Task list , Task is Approved and Completed&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_24&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step6.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-24&quot; height=&quot;246&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step6.jpg?w=630&amp;amp;h=246&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Check Workflow Status its Completed&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Check Workflow Status its Completed&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Happy Coding !!!!!&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/8343258923935722862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/8343258923935722862?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8343258923935722862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8343258923935722862'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/08/custom-sequential-approval-workflow-via.html' title='Custom Sequential Approval Workflow via Visual Studio 2010'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-8018937990671113129</id><published>2011-08-07T02:04:00.000+05:30</published><updated>2011-08-07T02:04:28.176+05:30</updated><title type='text'>SharePoint Escape Characters</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 style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;How sharepoint handles escape characters? Sharepoint internally replace escape character with some code like, if you are creating field with space in that name e.g. “my column” then sharepoint replace space with _x0020_ e.g “my_x0020_column”.&lt;br /&gt;
Following are the complete escape characters and their code in Sharepoint.&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Blank space: _x0020_&lt;br /&gt;
Underscore: _x002d_&lt;br /&gt;
Dash: _x0027_&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Here is the Format:&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;_x00[the escape code]_&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Char Code&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;[space] 20&lt;br /&gt;
3E&lt;br /&gt;
# 23&lt;br /&gt;
% 25&lt;br /&gt;
{ 7B&lt;br /&gt;
} 7D&lt;br /&gt;
| 7C&lt;br /&gt;
\ 5C&lt;br /&gt;
^ 5E&lt;br /&gt;
~ 7E&lt;br /&gt;
[ 5B&lt;br /&gt;
] 5D&lt;br /&gt;
` 60&lt;br /&gt;
; 3B&lt;br /&gt;
/ 2F&lt;br /&gt;
? 3F&lt;br /&gt;
: 3A&lt;br /&gt;
@ 40&lt;br /&gt;
= 3D&lt;br /&gt;
&amp;amp; 26&lt;br /&gt;
$ 24&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp;public static String GetFieldNamebyEscapeCharacter(String sName)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String sReturn = sName;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String sChar = &quot;_x00{0}_&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;_&quot;, String.Format(sChar, &quot;2d&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot; &quot;, String.Format(sChar, &quot;20&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;-&quot;, String.Format(sChar, &quot;27&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;#&quot;, String.Format(sChar, &quot;23&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;%&quot;, String.Format(sChar, &quot;25&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;{&quot;, String.Format(sChar, &quot;7B&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;}&quot;, String.Format(sChar, &quot;7D&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;|&quot;, String.Format(sChar, &quot;7C&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;\\&quot;, String.Format(sChar, &quot;5C&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;^&quot;, String.Format(sChar, &quot;5E&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;~&quot;, String.Format(sChar, &quot;7E&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;[&quot;, String.Format(sChar, &quot;5B&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;]&quot;, String.Format(sChar, &quot;5D&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;`&quot;, String.Format(sChar, &quot;60&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;;&quot;, String.Format(sChar, &quot;3B&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;/&quot;, String.Format(sChar, &quot;2F&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;?&quot;, String.Format(sChar, &quot;3F&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;:&quot;, String.Format(sChar, &quot;3A&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;@&quot;, String.Format(sChar, &quot;40&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;=&quot;, String.Format(sChar, &quot;3D&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;&amp;amp;&quot;, String.Format(sChar, &quot;26&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sReturn = sReturn.Replace(&quot;$&quot;, String.Format(sChar, &quot;24&quot;));&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return sReturn;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 23px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&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://sharepointarrow.blogspot.com/feeds/8018937990671113129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/8018937990671113129?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8018937990671113129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8018937990671113129'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/08/sharepoint-escape-characters.html' title='SharePoint Escape Characters'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-8425298649801777185</id><published>2011-08-07T02:03:00.002+05:30</published><updated>2011-08-07T02:03:22.062+05:30</updated><title type='text'>SharePoint Central Feature Management</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;My 4th open source contribution to Codeplex. Currently I am working on a Project which is product wrapper top of SharePoint. I need to activate almost 20 to 30 feature on every deployment, It takes around 10-15 minute to just&amp;nbsp;activate&amp;nbsp;those feature in Site Collection and Sub Sites. So I created on custom Application Page which will work as a Feature Management.and&amp;nbsp;&amp;nbsp;thought its nice to contribute on codeplex with that project which can help everyone, following are the screen shots and description &amp;nbsp;of the Project.&amp;nbsp;&lt;a href=&quot;http://centralfeaturemanage.codeplex.com/releases/view/70957&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot; title=&quot;Download Source Code&quot;&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;SharePoint Central Feature Management&lt;/strong&gt;&amp;nbsp;provides the functionality to manage all feature in Site Collection and all Sub Sites from one central location. also allow to Activate or Deactivate multiple feature on Single Click. Also allow user to Activate all dependent feature associated with current feature. Allow you to activate and deactivate hidden feature also.&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1. Activate&amp;nbsp;SharePoint Central Feature Management&amp;nbsp;from Site Collection Feature&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_32&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-11.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-32&quot; height=&quot;247&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-11.jpg?w=630&amp;amp;h=247&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Activate SCFM Feature from Site Collection&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Activate SharePoint Central Feature Management from the Site Collection Features&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2. After enabling the feature it will add link in Site Collection Administration&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_33&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-2.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-33&quot; height=&quot;353&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-2.jpg?w=630&amp;amp;h=353&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;After Activating the Feature it will Show you the Link under Site Collection Administration&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;After Activating the Feature it will Show you the Link under Site Collection Administration&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;3. Click on Central Feature Management&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_34&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-3.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-34&quot; height=&quot;278&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-3.jpg?w=630&amp;amp;h=278&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Landing Page of SharePoint Central Feature Management&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Landing Page of SharePoint Central Feature Management&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;4. Action and Filter control&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_35&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-4.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-35&quot; height=&quot;353&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-4.jpg?w=630&amp;amp;h=353&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Filter Tool Bar&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Filter Tool Bar&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Functionality:&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1. Type dropdown will allow you to select type of feature (Site Collection Feature or Web Feature)&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2. Select Web dropdown will allow you to select specific web from the dropdown (if type is web in first dropdown)&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;3. Show dropdown will allow you to select which type of feature you want to display “All”,”Activated”,”Needs to Activate”&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;4. Hidden Checkbox will allow you set whether you want to include Hidden feature or not.&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;5. On Filter button click will filter the result and display the result in below grid&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;6. Activate Button will activate all selected feature&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;7. Activate with Dependency will allow you to&amp;nbsp;activate&amp;nbsp;all&amp;nbsp;dependent&amp;nbsp;feature&amp;nbsp;associated with selected feature&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;8. Deactivate button will allow you to deactivate selected feature&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_36&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-5.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-36&quot; height=&quot;275&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/07/step-5.jpg?w=630&amp;amp;h=275&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Hidden feature in Highligted Color&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Hidden feature in Highligted Color&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Hope this will help everyone –&amp;nbsp;&lt;img alt=&quot;:-)&quot; class=&quot;wp-smiley&quot; src=&quot;http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif?m=1307725283g&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Happy Coding !!!!!!&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/8425298649801777185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/8425298649801777185?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8425298649801777185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/8425298649801777185'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/08/sharepoint-central-feature-management.html' title='SharePoint Central Feature Management'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-5444416927900082397</id><published>2011-08-07T02:00:00.001+05:30</published><updated>2011-08-07T02:05:30.779+05:30</updated><title type='text'>Modify Port Number or Add Custom Domain Name of SharePoint Site</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #444444; font-family: Helvetica-Neue, Helvetica, Arial, sans-serif; font-size: 16px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;There are multiple&amp;nbsp;scenario&amp;nbsp; where we need to host the Intranet site with domain name or change the port number of&amp;nbsp;existing web application of SharePoint. But most of us don’t know the&amp;nbsp;exact&amp;nbsp;steps how to do that. So my this post describe all steps required for&amp;nbsp;achieving&amp;nbsp;above&amp;nbsp;scenario’s&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Step 1. Open HOSTS file in notepad from&amp;nbsp;C:\Windows\System32\drivers\etc and update your domain name with IP of the server&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;like&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;mysite.com&lt;/strong&gt;&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_40&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/08/1.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-40&quot; height=&quot;452&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/08/1.jpg?w=630&amp;amp;h=452&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Host File Entry&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Host File Entry&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Step 2: Click on Start -&amp;gt; Run -&amp;gt; Type INETMGR -&amp;gt; press enter -&amp;gt; Select you website and click on Bindings -&amp;gt; Click on Edit&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_41&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/08/2.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-41&quot; height=&quot;235&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/08/2.jpg?w=630&amp;amp;h=235&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;IIS Mapping&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;IIS Mapping&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Step 3: Enter host header value which you have mentioned in HOSTS file (&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;mysite.com&lt;/strong&gt;) and update the port number which you want I am using 80 port&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_42&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 497px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/08/3.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-42&quot; height=&quot;225&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/08/3.jpg?w=487&amp;amp;h=225&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;IIS Host Header Entry&quot; width=&quot;487&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;IIS Host Header Entry&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Step 4 : Go To&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&amp;nbsp;SharePoint 2010 Central Administration -&amp;gt;&amp;nbsp;&lt;/strong&gt;&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;System Settings -&amp;gt; Configure alternate access mappings&lt;/strong&gt;&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_43&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/08/5.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-43&quot; height=&quot;157&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/08/5.jpg?w=630&amp;amp;h=157&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Alternate Access Mapping&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Alternate Access Mapping&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Step 5: Select you WebApplication -&amp;gt; Edit the URL &amp;nbsp;without port number (http://mysite.com) or &amp;nbsp;with port number (http://mysite.com:2222) -&amp;gt; Click OK&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_44&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 640px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/08/6.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-44&quot; height=&quot;96&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/08/6.jpg?w=630&amp;amp;h=96&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Update URL in AAM&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Update URL in AAM&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Done !! Access your site with new URL.&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;If &amp;nbsp;you receive error 401.1 when you browse a Web site that uses Integrated Authentication and is hosted on IIS 5.1 or a later version then follow below steps.&lt;/div&gt;&lt;h3 id=&quot;tocHeadRef&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(216, 216, 255); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #8279ad; font-family: Cambria, Georgia, serif; font-size: 1.4em; font-weight: normal; line-height: 26px; margin-bottom: 20px; margin-left: -10px; margin-right: 0px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; text-transform: uppercase; vertical-align: baseline;&quot;&gt;SPECIFY HOST NAMES (PREFERRED METHOD IF NTLM AUTHENTICATION IS DESIRED)&lt;/h3&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 23px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;To specify the host names that are mapped to the loopback address and can connect to Web sites on your computer, follow these steps:&lt;/div&gt;&lt;ol style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 30px; margin-left: 0px; margin-right: 0px; margin-top: 5px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 19px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 7px; margin-left: 25px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://support.microsoft.com/kb/281308&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;281308&lt;/a&gt;&amp;nbsp;&amp;nbsp;Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 19px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 7px; margin-left: 25px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Click&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Start&lt;/strong&gt;, click&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Run&lt;/strong&gt;, type&amp;nbsp;regedit, and then click&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 19px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 7px; margin-left: 25px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;In Registry Editor, locate and then click the following registry key:&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-45&quot; height=&quot;23&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/08/7.jpg?w=432&amp;amp;h=23&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;RegEdit URL&quot; width=&quot;432&quot; /&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 19px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 7px; margin-left: 25px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Right-click&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;MSV1_0&lt;/strong&gt;, point to&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;New&lt;/strong&gt;, and then click&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Multi-String Value&lt;/strong&gt;.&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/08/8.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-46&quot; height=&quot;256&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/08/8.jpg?w=630&amp;amp;h=256&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-style: initial; border-top-style: none; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Create New Multi String Value&quot; width=&quot;630&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 19px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 7px; margin-left: 25px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Type&amp;nbsp;BackConnectionHostNames, and then press ENTER.&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 19px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 7px; margin-left: 25px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Right-click&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;BackConnectionHostNames&lt;/strong&gt;, and then click&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Modify&lt;/strong&gt;.&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 21px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;wp-caption alignnone&quot; id=&quot;attachment_47&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; vertical-align: baseline; width: 366px;&quot;&gt;&lt;a href=&quot;http://realsharepoint.files.wordpress.com/2011/08/9.jpg&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #ac6c13; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-47&quot; height=&quot;314&quot; src=&quot;http://realsharepoint.files.wordpress.com/2011/08/9.jpg?w=356&amp;amp;h=314&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Add Domain Name&quot; width=&quot;356&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;wp-caption-text&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #777777; font-size: 13px; line-height: 20px; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: 10px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Add Domain Name&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 19px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 7px; margin-left: 25px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;In the&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Value data&lt;/strong&gt;&amp;nbsp;box, type the host name or the host names for the sites that are on the local computer, and then click&amp;nbsp;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 0.95em; line-height: 19px; list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 7px; margin-left: 25px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Quit Registry Editor, and then restart IIS (&amp;nbsp;IISRESET )&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Done !!!&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Happy Coding !!!!&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/5444416927900082397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/5444416927900082397?isPopup=true' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/5444416927900082397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/5444416927900082397'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/08/modify-port-number-or-add-custom-domain.html' title='Modify Port Number or Add Custom Domain Name of SharePoint Site'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-3815148064362351302</id><published>2011-07-07T15:29:00.000+05:30</published><updated>2011-07-07T15:29:30.439+05:30</updated><title type='text'>Associating a workflow with a content type programmatically : SharePoint 2010</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;One of the common requirements in sharepoint projects using workflows is to associate the workflow with a content type so that whenever an item of that content type is created/changed, the workflow starts. Quite often ,we need to do this task programmtically using features/event receivers etc.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;Well, here&#39;s the code snippet which specifies how to associate the sharepoint out of the box &#39;Collect feedback&#39; workflow and the &#39;Approval&#39; workflow with a content type. You&#39;ll need to use the &#39;Microsoft.SharePoint.Workflow&#39; namespace to be able to run this code.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;string taskListTitle = &quot;Tasks&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; string historyListTitle = &quot;Workflow History&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; string collectFeedbackWorkflowName = &quot;CollectFeedbackWorkflow&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; string approvalWorkflowName = &quot;ApprovalWorkflow&quot;;&lt;br /&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;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; SPWorkflowTemplate collectFeedbackWorkflowTemplate = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; SPWorkflowTemplate approvalWorkflowTemplate = null;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Initializing with workflow template IDs&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Guid collectFeedbackWorkflowTemplateID = new Guid(&quot;3bfb07cb-5c6a-4266-849b-8d6711700409&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Guid approvalWorkflowTemplateID = new Guid(&quot;8ad4d8f0-93a7-4941-9657-cf3706f00409&quot;);&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Getting workflow template based on workflow id&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (SPWorkflowTemplate template in this.CurrentWeb.WorkflowTemplates)&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (template.Id.Equals(collectFeedbackWorkflowTemplateID))&lt;br /&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; {&lt;br /&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; collectFeedbackWorkflowTemplate = template;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&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; if (template.Id.Equals(approvalWorkflowTemplateID))&lt;br /&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; {&lt;br /&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; approvalWorkflowTemplate = template;&lt;br /&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; }&lt;br /&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 class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------- Create collect feedback workflow association.--------------------------------------&lt;br /&gt;
&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; SPWorkflowAssociation collectFeedbackWorkflowAssociation = SPWorkflowAssociation.CreateWebContentTypeAssociation(collectFeedbackWorkflowTemplate,&lt;br /&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectFeedbackWorkflowName,&lt;br /&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskListTitle,&lt;br /&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; historyListTitle);&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //setting to specify that workflow can be started manually&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectFeedbackWorkflowAssociation.AllowManual = true;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //setting to specify that manage lists permissions is required for starting a workflow&lt;br /&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;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (collectFeedbackWorkflowAssociation.AllowManual)&lt;br /&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; {&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&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; SPBasePermissions emptyMask = SPBasePermissions.EmptyMask;&lt;br /&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emptyMask |= SPBasePermissions.ManageLists;&lt;br /&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;br /&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; collectFeedbackWorkflowAssociation.PermissionsManual = emptyMask;&lt;br /&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; }&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //setting to specify that workflow will be automatically started whenever a new item is added&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectFeedbackWorkflowAssociation.AutoStartCreate = true;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //setting to specify that workflow will be automatically started whenever an item is changed/edited&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collectFeedbackWorkflowAssociation.AutoStartChange = true;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp; //Adding workflow association to content type&amp;nbsp;(objContentType&amp;nbsp;is an object of type SPContentType)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; objContentType.WorkflowAssociations.Add(collectFeedbackWorkflowAssociation);&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //--------------------------- Create approval workflow association.--------------------------------------&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SPWorkflowAssociation approvalWorkflowAssociation = SPWorkflowAssociation.CreateWebContentTypeAssociation(approvalWorkflowTemplate,&lt;br /&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; approvalWorkflowName,&lt;br /&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; taskListTitle,&lt;br /&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; historyListTitle);&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //setting to specify that workflow can be started manually&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; approvalWorkflowAssociation.AllowManual = true;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&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;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //setting to specify that manage lists permissions is required for starting a workflow&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (approvalWorkflowAssociation.AllowManual)&lt;br /&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 class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&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; SPBasePermissions emptyMask = SPBasePermissions.EmptyMask;&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; emptyMask |= SPBasePermissions.ManageLists;&lt;br /&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; approvalWorkflowAssociation.PermissionsManual = emptyMask;&lt;br /&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 class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //setting to specify that workflow will be automatically started whenever a new item is added&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; approvalWorkflowAssociation.AutoStartCreate = true;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //setting to specify that workflow will be automatically started whenever an item is changed/edited&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; approvalWorkflowAssociation.AutoStartChange = true;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Adding workflow association to content type&amp;nbsp;(objContentType&amp;nbsp;is an object of type SPContentType)&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 class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; line-height: 17px;&quot;&gt;objContentType.WorkflowAssociations.Add(approvalWorkflowAssociation);&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 17px;&quot;&gt;Similar code can also be used for the custom workflow templates that we deploy.It is just that in that case we will have to specify the template name for our custom workflow that we need to associate with the content type.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/3815148064362351302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/3815148064362351302?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/3815148064362351302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/3815148064362351302'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2011/07/associating-workflow-with-content-type.html' title='Associating a workflow with a content type programmatically : SharePoint 2010'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-2600705558045745487</id><published>2007-03-28T09:33:00.000+05:30</published><updated>2007-03-28T09:35:02.479+05:30</updated><title type='text'>C# StreamReader and StreamWriter</title><content type='html'>You can have a StreamWriter object as the return value from calling the method File.CreateText(). You can also create a StreamWriter object using one of its constructor overloads. The following example illustrates using a StreamWriter object with a FileStream object to write characters to the file aFile.txt&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.IO;&lt;br /&gt;&lt;br /&gt;namespace MyStreams&lt;br /&gt;{&lt;br /&gt;  class Class1&lt;br /&gt;  {&lt;br /&gt;    public static void Main() &lt;br /&gt;    {&lt;br /&gt;      try&lt;br /&gt;      {&lt;br /&gt;        FileStream fs = new FileStream&lt;br /&gt;(&quot;aFile.txt&quot;,FileMode.Create,&lt;br /&gt;        FileAccess.ReadWrite,FileShare.None);&lt;br /&gt;        string[] strings = {&quot;C#&quot;, &quot;ASP.NET&quot;, &quot;XML&quot;};&lt;br /&gt;        using(StreamWriter sw = new StreamWriter(fs))&lt;br /&gt;        {&lt;br /&gt;          Console.WriteLine(&quot;This StreamWriter instance uses {0}&lt;br /&gt;to write to the file&quot;, sw.BaseStream);&lt;br /&gt;          Console.WriteLine(&quot;The Property sw.Encoding returns:&lt;br /&gt;{0}&quot;,sw.Encoding);&lt;br /&gt;          sw.WriteLine(&quot;www.aspfree.com&quot;);&lt;br /&gt;          sw.WriteLine(&quot;contains many useful articles&quot;);&lt;br /&gt;          sw.WriteLine(&quot;on many different technologies like {0},&lt;br /&gt;{1} and {2}&quot;, strings);&lt;br /&gt;        }&lt;br /&gt;        Console.WriteLine(&quot;Data has been written to the file&quot;);&lt;br /&gt;        Console.ReadLine();&lt;br /&gt;      }&lt;br /&gt;      catch(IOException ex)&lt;br /&gt;      {&lt;br /&gt;        Console.WriteLine(ex.Message);&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/2600705558045745487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/2600705558045745487?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/2600705558045745487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/2600705558045745487'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2007/03/c-streamreader-and-streamwriter.html' title='C# StreamReader and StreamWriter'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-461319350509766292</id><published>2007-03-28T09:31:00.000+05:30</published><updated>2007-03-28T09:33:18.119+05:30</updated><title type='text'>C# Delegates Explained</title><content type='html'>This may be the first time you&#39;ve read about this new .NET type. A delegate is an object that refers to a static method or an instance method. In this article I discuss what delegates are, how you can create and use them, and how the C# compiler saves us time by generating the delegate&#39;s class. We will also look at the MSIL code, talk about multicast delegates and provide callback methods through the use of delegates.&lt;br /&gt;A delegate is an object that is created to refer to a static method or an instance method, and then used to call this method. To start off, you create a new delegate type in a different way than you create any other class. You use the delegate keyword as in the following statement.&lt;br /&gt;&lt;br /&gt;public delegate int DelegateToMethod(int x, int y);&lt;br /&gt;&lt;br /&gt;It seems unusual I know, but I will explain how it&#39;s done. Let&#39;s take a look at the very first example that explains how to use a delegate.&lt;br /&gt;&lt;br /&gt;The First Delegate Example&lt;br /&gt;&lt;br /&gt;Copy the following code into your VS.NET class file and run the project.&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;&lt;br /&gt;namespace Delegates&lt;br /&gt;{&lt;br /&gt;  public delegate int DelegateToMethod(int x, int y);&lt;br /&gt;&lt;br /&gt;  public class Math&lt;br /&gt;  {&lt;br /&gt;    public static int Add(int first, int second)&lt;br /&gt;    {&lt;br /&gt;      return first + second;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static int Multiply(int first, int second)&lt;br /&gt;    {&lt;br /&gt;      return first * second;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static int Divide(int first, int second)&lt;br /&gt;    {&lt;br /&gt;      return first / second;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public class DelegateApp&lt;br /&gt;  {&lt;br /&gt;    public static void Main()&lt;br /&gt;    {&lt;br /&gt;      DelegateToMethod aDelegate = new DelegateToMethod(Math.Add);&lt;br /&gt;      DelegateToMethod mDelegate = new DelegateToMethod(Math.Multiply);&lt;br /&gt;      DelegateToMethod dDelegate = new DelegateToMethod(Math.Divide);&lt;br /&gt;      Console.WriteLine(&quot;Calling the method Math.Add() through the aDelegate object&quot;);&lt;br /&gt;      Console.WriteLine(aDelegate(5,5));&lt;br /&gt;      Console.WriteLine(&quot;Calling the method Math.Multiply() through the mDelegate object&quot;);&lt;br /&gt;      Console.WriteLine(mDelegate(5,5));&lt;br /&gt;      Console.WriteLine(&quot;Calling the method Math.Divide() through the dDelegate object&quot;);&lt;br /&gt;      Console.WriteLine(dDelegate(5,5));&lt;br /&gt;      Console.ReadLine();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;When you run the above code you will get the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let&#39;s explain what&#39;s going on in this example step-by-step. We have defined a new delegate type using the statement &lt;br /&gt;&lt;br /&gt;public delegate int DelegateToMethod(int x, int y);&lt;br /&gt;&lt;br /&gt;You are used to defining a new class using the class keyword, then an identifier followed by {, then implementation in the form of methods, properties and fields followed by }. The case is different with delegates. When we define a new delegate type (like DelegateToMethod) the C# compiler generates a class called DelegateToMethod that derives the System.MultipcastDelegate as follows:&lt;br /&gt;&lt;br /&gt;public sealed class DelegateToMethod : System.MulticastDelegate&lt;br /&gt;{&lt;br /&gt;  public DelegateToMethod(object target, int method);&lt;br /&gt;  public virtual void Invoke(int x, int y);&lt;br /&gt;  public virtual IAsyncResult BeginInvoke(int x, int y,&lt;br /&gt;AsyncCallback callback, object obj);&lt;br /&gt;  public virtual void EndInvoke(IAsyncResult result);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The Constructor method of this class takes two arguments. The first is an object reference of the type that defined the instance method that the delegate refers to, and the second is an int value of the function pointer to the method that the delegate encapsulates. &lt;br /&gt;&lt;br /&gt;The Invoke() method has the same signature as our delegate declaration. This method is used to call the delegate&#39;s encapsulated method. Note that when we defined the delegate we provided a signature for the method that can be encapsulated. In other words, the delegate can&#39;t refer to a method with a different signature than the one that it is created with. The BeginInvoke() and EndInvoke() provide asynchronous calls, which are beyond the scope of this article.&lt;br /&gt;&lt;br /&gt;The C# compiler generates the sealed class with the four virtual methods, but it doesn&#39;t generate any implementation for those methods because they have to be implemented by the Common Language Runtime. So up to the point we have discussed, the folks at Microsoft saved us a lot of time by providing the delegate keyword which we can use to generate a class based on the System.MulticastDelegate. Let&#39;s continue our example.&lt;br /&gt;&lt;br /&gt;The Math class contains three simple methods (Add, Multiply and Divide) that accept two int values and return an int value. Note that those are static methods. The DelegateApp class creates three DelegateToMethod objects as shown next:&lt;br /&gt;&lt;br /&gt;DelegateToMethod aDelegate = new DelegateToMethod(Math.Add);&lt;br /&gt;DelegateToMethod mDelegate = new DelegateToMethod(Math.Multiply);&lt;br /&gt;DelegateToMethod dDelegate = new DelegateToMethod(Math.Divide);&lt;br /&gt;&lt;br /&gt;Those three statements create three delegate objects. I think that the issue that would confuse someone is illustrated in the following screen shot:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As you can see, the signature of the Constructor method is not shown; instead, the signature of the method that can be encapsulated by the delegate is shown, or we can say the signature of the delegate. Any method that accepts two int values can return an int. We can look at a delegate as a type-safe function pointer which means that the parameter list and the return type are known. &lt;br /&gt;&lt;br /&gt;We create a delegate object using the new operator and pass it the method to be encapsulated. Note that we have said that the generated class&#39; constructor is passed two parameters, and because the passed methods are static, the first parameter will be null value (if it was an instance method it would be the object reference that defined the method instead of the null value).&lt;br /&gt;&lt;br /&gt;We have said that in order to call the delegate&#39;s encapsulated method we need to call the delegate&#39;s Invoke() method. Actually, we can&#39;t call this method directly; instead we use the object reference and pass it the arguments as we did in the above code. Take a look again:&lt;br /&gt;&lt;br /&gt;Console.WriteLine(aDelegate(5,5));&lt;br /&gt;&lt;br /&gt;The statement calls the encapsulated method (which is Math.Add) and passes the parameters as arguments to the method, which returns the value 10.&lt;br /&gt;&lt;br /&gt;Put simply, to use a delegate:&lt;br /&gt;&lt;br /&gt;Define a new type that inherits from System.MulticastDelegate class and provide the signature of the methods that can be encapsulated by the new type.&lt;br /&gt;&lt;br /&gt;public delegate int DelegateToMethod(int x, int y);&lt;br /&gt;&lt;br /&gt;Create an instance or static method that has the same signature as defined by the new delegate type.&lt;br /&gt;&lt;br /&gt;public static int Add(int first, int second)&lt;br /&gt;{&lt;br /&gt;  return first + second;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Create a new delegate object using the new operator and pass the method as a parameter to it.&lt;br /&gt;&lt;br /&gt;DelegateToMethod aDelegate = new DelegateToMethod(Math.Add);&lt;br /&gt;&lt;br /&gt;Invoke the delegate object and pass the arguments to it which in turn calls the referenced method.&lt;br /&gt;&lt;br /&gt;Console.WriteLine(aDelegate(5,5));</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/461319350509766292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/461319350509766292?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/461319350509766292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/461319350509766292'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2007/03/c-delegates-explained.html' title='C# Delegates Explained'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-7277325486086979974</id><published>2007-03-28T09:29:00.000+05:30</published><updated>2007-03-28T09:30:48.055+05:30</updated><title type='text'>Building a complete COM+ Server component using C# and .NET</title><content type='html'>To develop .NET managed components that can be configured to function under the COM+ Runtime, you need to provide these components with numerous attributes defined in the System.EnterpriseServices namespace. To start off, each .NET class that&#39;s supposed to run under COM+ needs to derive from the System.ServicedComponent class. This base class provides default implementations of the classic MTS/COM+ interface IObjectControl - Activate(), Deactivate(), and CanBePooled(). You can override the default implementations if you wish to do so, just as will be seen shortly.&lt;br /&gt;&lt;br /&gt;Once any number of COM+ centric attributes are added to the .NET component, the assembly will have to be compiled. However, to place this assembly under the control of COM+, a new utility (regsvcs.exe) will have to be used as we will see soon. In addition to installing the component into the COM+ catalog, this utility also provides a lot of other services that we shall soon see.&lt;br /&gt;&lt;br /&gt;Finally, for the COM+ Surrogate (dllhost.exe) to locate your assembly and to host it in a given activity, it must be able to locate your binary. Therefore, you should install your assembly into the system&#39;s Global Assembly Cache (GAC).&lt;br /&gt;&lt;br /&gt;The various steps that are involved in creating a COM+ Server Component using C# and the .NET Framework are as follows (I&#39;m going to assume you&#39;re using the VS.NET IDE):&lt;br /&gt;&lt;br /&gt;Create a Visual C# - Class Library project&lt;br /&gt;&lt;br /&gt;Generate a Key-Value pair to use when deploying your Shared Assembly&lt;br /&gt;&lt;br /&gt;Configure your Project Property Pages with the right information&lt;br /&gt;&lt;br /&gt;Develop the AccountManager.cs library&lt;br /&gt;&lt;br /&gt;Modify the generated AssemblyInfo.cs to add the right assembly information&lt;br /&gt;&lt;br /&gt;Build the Project Files&lt;br /&gt;&lt;br /&gt;Deploy the component as a Shared Assembly, and Configure the Assembly in the COM+ Catalog&lt;br /&gt;&lt;br /&gt;The BookKeeper Module&lt;br /&gt;&lt;br /&gt;My goal is to simplify illustration of a typical COM+ serviced component development process. I am therefore, in this article, going to reuse the BookKeeper example for all database operations. As a result, all our data is going to be maintained in an XML datastore!!! I had used the BookKeeper example in an earlier article to illustrate ADO.NET&#39;s disconnected operation facility - the DataSet. To refresh, the DataSet facilitates the client to manipulate and update a local copy of any number of related tables while still disconnected from the data source and submit the modified data back for processing using a related data adapter at a later point in time.&lt;br /&gt;&lt;br /&gt;The AccountManager Module&lt;br /&gt;&lt;br /&gt;Our hypothetical AccountManager Module (that we will build in this article), is actually a COM+ Server component that performs just a couple of functions. It is the module that manages creation and deletion of accounts (Checking accounts or Savings accounts) for a Large Commercial Bank Project. It offers no other services except &quot;Create Account&quot;, and &quot;Delete Account&quot;.&lt;br /&gt;&lt;br /&gt;1. Create a Visual C# - Class Library project&lt;br /&gt;&lt;br /&gt;Create a new Visual C# Class Library project. Remember that the COM+ Runtime can only host types contained in a DLL.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;2. Generate a Key-Value pair to use when deploying your Shared Assembly&lt;br /&gt;&lt;br /&gt;Shared Assemblies are those that can be used by any client application, such as a system DLL that every process in the system can use. Unlike private-assemblies, shared assemblies must be published or registered in the system&#39;s Global Assembly Cache (GAC). As soon as they are registered in the GAC, they act as system components. An essential requirement for GAC registration is that the component must possess originator and version information. In addition to other metadata information, these two items allow multiple versions of the same component to be registered and executed on the same machine. Unlike Classic COM, we don&#39;t have to store any information in the system registry for clients to use these shared assemblies.&lt;br /&gt;&lt;br /&gt;There are three general steps to registering shared assemblies in the GAC:&lt;br /&gt;&lt;br /&gt;The Shared Name (sb.exe) utility should be used to obtain the public/private key pair. This utility generates a random key pair value, and stores it in an output file - for example, AccountManager.key.&lt;br /&gt;&lt;br /&gt;Build the assembly with an assembly version number and the key information in the AccountManager.key&lt;br /&gt;&lt;br /&gt;Using the .NET Global Assembly Cache (gacutil.exe) utility, register the assembly in the GAC. &lt;br /&gt;&lt;br /&gt;The assembly now becomes a shared assembly and can be used by any client in the system.&lt;br /&gt;&lt;br /&gt;Therefore, as a first step, use the Shared Name Utility to obtain a public/private key pair and store it in a file (AccountManager.key, in this case) as shown below.&lt;br /&gt;&lt;br /&gt;Command Prompt &lt;br /&gt;C:\MyProjects\Cornucopia\COMplus\BankServer\AccountManager&gt;sn -k AccountManager.key&lt;br /&gt;&lt;br /&gt;Microsoft (R) .NET Framework Strong Name Utility Version 1.0.2914.16&lt;br /&gt;Copyright (C) Microsoft Corp. 1998-2001. All rights reserved.&lt;br /&gt;&lt;br /&gt;Key pair written to AccountManager.key&lt;br /&gt;&lt;br /&gt;C:\MyProjects\Cornucopia\COMplus\BankServer\AccountManager&gt; &lt;br /&gt;&lt;br /&gt;The -k option generates the random key pair and saves the key information in the AccountManager.key file. We use this file as input when we build our Shared Assemblies.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;3.  Configure your Project Property Pages with the right information&lt;br /&gt;&lt;br /&gt;Configure the Project Properties with the right information. Make sure you specify the Assembly Name that you want for the Assembly. Specifically, move to the General tab, and in the Wrapper Assembly Key File area, enter the key file to use. In this case, it is AccountManager.key.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Move to the Reference Path Properties area, and select the directory that contains the BookKeeper executable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Go to &quot;Project Dependancy&quot; and select the BookKeeper as a dependancy for this project. This means the BookKeeper project has to be compiled before compiling this project.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To the AccountManager project files, also add the BookKeeper.cs, and the AccountKey.cs files from the BookKeeper project.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. Develop the AccountManager.cs library&lt;br /&gt;&lt;br /&gt;Transactions&lt;br /&gt;&lt;br /&gt;To develop a .NET class that supports transactions, here&#39;s what you have to do:&lt;br /&gt;&lt;br /&gt;The class must derive from the System.ServicedComponent class to exploit COM+ Services as shown in Line 94. &lt;br /&gt;The class must be created with the correct Transaction attribute such as Transaction (TransactionOption.Required) as shown in Line 78. &lt;br /&gt;Besides this, you can use the System.EnterpriseServices.ContextUtil class to obtain information about the COM+ object context as shown in Line 138. This class exposes important methods of COM+ like SetComplete() and SetAbort(), and IsCallerInRole(), and important COM+ properties like IsInTransaction, and MyTransactionVote. Additionally, while it&#39;s not necessary to specify COM+ Application installation options, you can always specify what you want. Notice that we use attributes to specify a number of things. &lt;br /&gt;&lt;br /&gt;In the AccountManager.create() method, we simply call ContextUtil.SetComplete() - Line 138 -when we&#39;ve successfully created a new account into our database. If something has gone wrong during the process, we will vote to abort the transaction by calling ContextUtil.SetAbort() as shown on Line 142.&lt;br /&gt;&lt;br /&gt;Instead of calling ContextUtil.SetComplete() and ContextUtil.SetAbort() explicitly, we can also use the AutoComplete( true ) attribute, as shown on line 165 which is conceptually equivalent to the previously shown AccountManager.create() method.&lt;br /&gt;&lt;br /&gt; using System;&lt;br /&gt;using System.Runtime.InteropServices;&lt;br /&gt;using System.EnterpriseServices;&lt;br /&gt;// Include the following for the Trace class&lt;br /&gt;using System.Diagnostics;   &lt;br /&gt;// Include the following for Windows Message Box&lt;br /&gt;using System.Windows.Forms; &lt;br /&gt;// Include the BookKeeper namespace&lt;br /&gt;using BookKeeper;&lt;br /&gt;&lt;br /&gt;namespace Bank {&lt;br /&gt;&lt;br /&gt;  ///////////////////////////////////////////////////////////////&lt;br /&gt;  /// &lt;summary&gt;&lt;br /&gt;  /// The Account Manager interface&lt;br /&gt;  /// &lt;/summary&gt;&lt;br /&gt;  /// &lt;remarks&gt;&lt;br /&gt;  /// This interface defines create and delete methods to&lt;br /&gt;  /// add or delete Bank Accounts&lt;br /&gt;  /// &lt;/remarks&gt;&lt;br /&gt;  ///////////////////////////////////////////////////////////////&lt;br /&gt;&lt;br /&gt;  /// Indicate whether a managed interface is dual, IDispatch or &lt;br /&gt;  /// IUnknown based when exposed to COM&lt;br /&gt;  [ InterfaceTypeAttribute( ComInterfaceType.InterfaceIsDual ) ]&lt;br /&gt;&lt;br /&gt;  public interface IAccountManager {&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// The create method&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    /// &lt;remarks&gt;&lt;br /&gt;    /// Method used to create a new Bank account&lt;br /&gt;    /// &lt;/remarks&gt;&lt;br /&gt;    /// &lt;param name=&quot;type&quot;&gt;Either Checking or Savings&lt;/param&gt;&lt;br /&gt;    /// &lt;param name=&quot;customerNames&quot;&gt;Customers who own this account&lt;/param&gt;&lt;br /&gt;    /// &lt;param name=&quot;startingBalance&quot;&gt;Initial Deposit&lt;/param&gt;&lt;br /&gt;    /// &lt;returns&gt;&lt;/returns&gt;&lt;br /&gt;    int create (AccountType type, string[] customerNames, float startingBalance);&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// The delete method&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    /// &lt;remarks&gt;&lt;br /&gt;    /// Method used to delete and existing Bank account&lt;br /&gt;    /// &lt;/remarks&gt;&lt;br /&gt;    /// &lt;param name=&quot;accountKey&quot;&gt;the Account Number&lt;/param&gt;&lt;br /&gt;    /// &lt;returns&gt;true if Account deleted, false if not&lt;/returns&gt;&lt;br /&gt;    bool delete (int accountKey);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  ///////////////////////////////////////////////////////////////&lt;br /&gt;  /// &lt;summary&gt;&lt;br /&gt;  /// AccountManager used to create new Accounts or delete accounts.&lt;br /&gt;  /// &lt;/summary&gt;&lt;br /&gt;  ///////////////////////////////////////////////////////////////&lt;br /&gt;&lt;br /&gt;  /// Specify a name for your serviced component&lt;br /&gt;  [ ProgId( &quot;COM+ Bank Server Account Manager&quot; ) ]&lt;br /&gt;  /// Add content to hosting COM+ App&#39;s description field&lt;br /&gt;  [ Description( &quot;COM+ Bank Server Account Manager&quot; ) ]&lt;br /&gt;  /// Configure component&#39;s Transaction Option&lt;br /&gt;  [ Transaction( TransactionOption.Required ) ]&lt;br /&gt;  /// Configure component&#39;s object pooling&lt;br /&gt;  [ ObjectPooling( MinPoolSize = 5, MaxPoolSize = 10, CreationTimeout = 20 ) ]&lt;br /&gt;  /// Specify COM+ Context Attributes&lt;br /&gt;  [ MustRunInClientContext( false ) ]&lt;br /&gt;  /// Enable event tracking&lt;br /&gt;  [ EventTrackingEnabled( true ) ]&lt;br /&gt;  /// Enable JITA for the component&lt;br /&gt;  [ JustInTimeActivation( true ) ]&lt;br /&gt;  /// Enable Construction String Support for the component&lt;br /&gt;  [ ConstructionEnabled( Enabled=true, Default=&quot;Gopalan&#39;s Bank Server&quot; ) ]&lt;br /&gt;  /// Configure activity-based Synchronization for the component&lt;br /&gt;  [ Synchronization( SynchronizationOption.Required ) ]&lt;br /&gt;  /// Indicate the type of class interface that will be generated for this class&lt;br /&gt;  [ ClassInterface( ClassInterfaceType.AutoDual ) ]&lt;br /&gt;&lt;br /&gt;  public class AccountManager : ServicedComponent, IAccountManager {&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// Public No-argument Default Constructor&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    public AccountManager() {&lt;br /&gt;      MessageBox.Show (&quot;Bank::AccountManager() invoked...&quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /////////////////////////////////////////////////////////////////////////&lt;br /&gt;    /// The Following methods support core functionality required of the&lt;br /&gt;    /// AccountManager component and implement the IAccountManager interface&lt;br /&gt;    /////////////////////////////////////////////////////////////////////////&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// The create method&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    /// &lt;remarks&gt;&lt;br /&gt;    /// Method used to create a new Bank account&lt;br /&gt;    /// &lt;/remarks&gt;&lt;br /&gt;    /// &lt;param name=&quot;type&quot;&gt;Either Checking or Savings&lt;/param&gt;&lt;br /&gt;    /// &lt;param name=&quot;customerNames&quot;&gt;Customers who own this account&lt;/param&gt;&lt;br /&gt;    /// &lt;param name=&quot;startingBalance&quot;&gt;Initial Deposit&lt;/param&gt;&lt;br /&gt;    /// &lt;returns&gt;&lt;/returns&gt;&lt;br /&gt;&lt;br /&gt;    /// Add content to hosting COM+ App&#39;s description field&lt;br /&gt;    [ Description( &quot;Creates a new account for the Bank Server&quot; ) ]&lt;br /&gt;&lt;br /&gt;    public int create (AccountType type, string[] customerNames, float startingBalance) {&lt;br /&gt;      MessageBox.Show (&quot;Bank::create() invoked...&quot;);&lt;br /&gt;      AccountKey key = null;&lt;br /&gt;      try {&lt;br /&gt;        // Create the BookKeeper class&lt;br /&gt;        BookKeeper.BookKeeper keeper = new BookKeeper.BookKeeper();&lt;br /&gt;        if (null != keeper) {&lt;br /&gt;          // Call the BookKeeper to create a new Bank Account&lt;br /&gt;          key = keeper.createAccount (type, customerNames, startingBalance);&lt;br /&gt;          // Clean-up the BookKeeper object&lt;br /&gt;          keeper.Dispose();&lt;br /&gt;        }&lt;br /&gt;        else {&lt;br /&gt;          throw new Exception ( &quot;BookKeeper Object could not be created.&quot; ); &lt;br /&gt;        }&lt;br /&gt;        // Since everything went well, commit the changes&lt;br /&gt;        ContextUtil.SetComplete();&lt;br /&gt;      }&lt;br /&gt;      catch (Exception exception) {&lt;br /&gt;        // An Error occured, so rollback the changes&lt;br /&gt;        ContextUtil.SetAbort();&lt;br /&gt;&lt;br /&gt;        // Trace the current COM+ context ID (its GUID) to the output window&lt;br /&gt;        // use the ContextId static property of ContextUtil&lt;br /&gt;        Guid contextID = ContextUtil.ContextId;&lt;br /&gt;        String traceMessage = &quot;Context ID is &quot; + contextID.ToString();&lt;br /&gt;        Trace.WriteLine (traceMessage.ToString ());&lt;br /&gt;&lt;br /&gt;        MessageBox.Show (exception.ToString (), &quot;Bank::create()&quot;);&lt;br /&gt;      }&lt;br /&gt;      return key.Key;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// The delete method&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    /// &lt;remarks&gt;&lt;br /&gt;    /// Method used to delete and existing Bank account&lt;br /&gt;    /// &lt;/remarks&gt;&lt;br /&gt;    /// &lt;param name=&quot;accountKey&quot;&gt;the Account Number&lt;/param&gt;&lt;br /&gt;    /// &lt;returns&gt;true if Account deleted, false if not&lt;/returns&gt;&lt;br /&gt;&lt;br /&gt;    /// Take advantage of COM+&#39;s method auto-deactivation&lt;br /&gt;    [ AutoComplete( true ) ]&lt;br /&gt;      /// Add content to hosting COM+ App&#39;s description field&lt;br /&gt;    [ Description( &quot;Deletes an existing account from the Bank Server&quot; ) ]&lt;br /&gt;&lt;br /&gt;    public bool delete (int accountKey) {&lt;br /&gt;      bool result = false;&lt;br /&gt;      MessageBox.Show (&quot;Bank::delete() invoked...&quot;, &quot;Key Value = &quot;+accountKey);&lt;br /&gt;      /*&lt;br /&gt;      try {&lt;br /&gt;        // Programming Role based security&lt;br /&gt;        SecurityCallContext callContext;&lt;br /&gt;        callContext = SecurityCallContext.CurrentCall;&lt;br /&gt;        string caller = callContext.DirectCaller.AccountName;&lt;br /&gt;        bool isInRole = callContext.IsCallerInRole ( &quot;Manager&quot; );&lt;br /&gt;        if (false == isInRole) {&lt;br /&gt;          throw new Exception ( &quot;Only Managers can delete Customers&quot; );&lt;br /&gt;        }&lt;br /&gt;        */&lt;br /&gt;        BookKeeper.BookKeeper keeper = new BookKeeper.BookKeeper();&lt;br /&gt;        if (null != keeper) {&lt;br /&gt;          AccountKey key = new AccountKey();&lt;br /&gt;          key.Key = accountKey;&lt;br /&gt;          result = keeper.deleteAccount (key);&lt;br /&gt;          keeper.Dispose();&lt;br /&gt;        }&lt;br /&gt;        else {&lt;br /&gt;          throw new Exception ( &quot;BookKeeper Object could not be created.&quot; );&lt;br /&gt;        }&lt;br /&gt;      /*}&lt;br /&gt;      catch (Exception exception) {&lt;br /&gt;        Guid contextID = ContextUtil.ContextId;&lt;br /&gt;        String traceMessage = &quot;Context ID is &quot; + contextID.ToString();&lt;br /&gt;        Trace.WriteLine (traceMessage.ToString ());&lt;br /&gt;&lt;br /&gt;        MessageBox.Show (exception.ToString (), &quot;Bank::delete()&quot;);&lt;br /&gt;      }*/&lt;br /&gt;      return result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /////////////////////////////////////////////////////////////////////////&lt;br /&gt;    /// All the Following methods support overriding functionality required for &lt;br /&gt;    /// implementing some of the COM+ support interfaces like IObjectConstruct.&lt;br /&gt;    /////////////////////////////////////////////////////////////////////////&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// The method is called after the component&#39;s constructor&lt;br /&gt;    /// and is passed in the user specific constructionString&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    /// &lt;param name=&quot;constructionString&quot;&gt;&lt;/param&gt;&lt;br /&gt;    override public void Construct (string constructionString) {&lt;br /&gt;      MessageBox.Show (&quot;Bank::Construct() invoked...&quot;);&lt;br /&gt;      MessageBox.Show (constructionString, &quot;Construction String&quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// Do context specific initialization in this method&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    override public void Activate () {&lt;br /&gt;      MessageBox.Show (&quot;Bank::Activate() invoked...&quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// Do context specific cleanup in this method&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    override public void Deactivate () {&lt;br /&gt;      MessageBox.Show (&quot;Bank::Deactivate() invoked...&quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /// &lt;summary&gt;&lt;br /&gt;    /// Object Pooling support method&lt;br /&gt;    /// &lt;/summary&gt;&lt;br /&gt;    /// &lt;returns&gt;true if pooling is supported, false if not&lt;/returns&gt;&lt;br /&gt;    override public bool CanBePooled () {&lt;br /&gt;      MessageBox.Show (&quot;Bank::CanBePooled() invoked...&quot;);&lt;br /&gt;      return true;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Object Pooling&lt;br /&gt;&lt;br /&gt;Object Pooling is a feature that was introduced in COM+, but was missing in MTS. Object Pooling allows you to minimize the use of system resources, by pooling objects that support transactions but are expensive to create. This improves performance and helps system scalability. If you want to support object pooling in you components, you need to derive from the System.ServicedComponent class, and override any of the Activate(), Deactivate(), and CanBePooled() methods, and specify object pooling requirements in an ObjectPooling attribute as shown on Line 80. You can take advantage of the Activate() and Deactivate() methods to perform the appropriate initialization and cleanup. The CanBePooled() method is used to tell COM+ whether this object can be pooled or not. This way, you can provide any expensive object-creation functionality in the constructor of the component. &lt;br /&gt;&lt;br /&gt;Since our COM+ components support Object Pooling, The COM+ runtime activates and deactivates them as required. After each Client call has been serviced, it puts the component object back into the object pool. As soon as a new Client call arrives, it picks the same component object back from the pool to service the new request.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;5. Modify the generated AssemblyInfo.cs to add the right assembly information&lt;br /&gt;&lt;br /&gt;You provide the compiler with your assembly information in an assembly file called AssemblyInfo.cs. The assembly information file is compiled with the  rest of the project&#39;s source files. The information is in the form of assembly attributes - directives to the compiler on the information to embed in the assembly.&lt;br /&gt;&lt;br /&gt;AssemblyInfo.cs &lt;br /&gt;1:&lt;br /&gt;2:&lt;br /&gt;3:&lt;br /&gt;4:&lt;br /&gt;5:&lt;br /&gt;6:&lt;br /&gt;7:&lt;br /&gt;8:&lt;br /&gt;9:&lt;br /&gt;10:&lt;br /&gt;11:&lt;br /&gt;12:&lt;br /&gt;13:&lt;br /&gt;14:&lt;br /&gt;15:&lt;br /&gt;16:&lt;br /&gt;17:&lt;br /&gt;18:&lt;br /&gt;19:&lt;br /&gt;20:&lt;br /&gt;21:&lt;br /&gt;22:&lt;br /&gt;23:&lt;br /&gt;24:&lt;br /&gt;25:&lt;br /&gt;26:&lt;br /&gt;27:&lt;br /&gt;28:&lt;br /&gt;29:&lt;br /&gt;30:&lt;br /&gt;31:&lt;br /&gt;32:&lt;br /&gt;33:&lt;br /&gt;34:&lt;br /&gt;35:&lt;br /&gt;36:&lt;br /&gt;37:&lt;br /&gt;38:&lt;br /&gt;39:&lt;br /&gt;40:&lt;br /&gt;41:&lt;br /&gt;42:&lt;br /&gt;43:&lt;br /&gt;44:&lt;br /&gt;45:&lt;br /&gt;46:&lt;br /&gt;47:&lt;br /&gt;48:&lt;br /&gt;49:&lt;br /&gt;50:&lt;br /&gt;51:&lt;br /&gt;52:&lt;br /&gt;53:&lt;br /&gt;54:&lt;br /&gt;55:&lt;br /&gt;56:&lt;br /&gt;57:&lt;br /&gt;58:&lt;br /&gt;59:&lt;br /&gt;60:&lt;br /&gt;61:&lt;br /&gt;62:&lt;br /&gt; using System.Reflection;&lt;br /&gt;using System.Runtime.CompilerServices;&lt;br /&gt;using System.EnterpriseServices;&lt;br /&gt;&lt;br /&gt;//&lt;br /&gt;// General Information about an assembly is controlled through the following &lt;br /&gt;// set of attributes. Change these attribute values to modify the information&lt;br /&gt;// associated with an assembly.&lt;br /&gt;//&lt;br /&gt;[assembly: AssemblyTitle(&quot;AccountManager for Bank&quot;)]&lt;br /&gt;[assembly: AssemblyDescription(&quot;Creates and Deletes Accounts for the Bank&quot;)]&lt;br /&gt;[assembly: AssemblyConfiguration(&quot;&quot;)]&lt;br /&gt;[assembly: AssemblyCompany(&quot;eCommWare Corporation&quot;)]&lt;br /&gt;[assembly: AssemblyProduct(&quot;COM+ Bank Server&quot;)]&lt;br /&gt;[assembly: AssemblyCopyright(&quot;(c) 2001, Gopalan Suresh Raj. All Rights Reserved.&quot;)]&lt;br /&gt;[assembly: AssemblyTrademark(&quot;Web Cornucopia&quot;)]&lt;br /&gt;[assembly: AssemblyCulture(&quot;en-US&quot;)]&lt;br /&gt;&lt;br /&gt;//&lt;br /&gt;// Version information for an assembly consists of the following four values:&lt;br /&gt;//&lt;br /&gt;//      Major Version&lt;br /&gt;//      Minor Version &lt;br /&gt;//      Build Number&lt;br /&gt;//      Revision&lt;br /&gt;//&lt;br /&gt;// You can specify all the values or you can default the Revision and Build Numbers &lt;br /&gt;// by using the &#39;*&#39; as shown below:&lt;br /&gt;&lt;br /&gt;[assembly: AssemblyVersion(&quot;1.0.0.0&quot;)]&lt;br /&gt;&lt;br /&gt;//&lt;br /&gt;// In order to sign your assembly you must specify a key to use. Refer to the &lt;br /&gt;// Microsoft .NET Framework documentation for more information on assembly signing.&lt;br /&gt;//&lt;br /&gt;// Use the attributes below to control which key is used for signing. &lt;br /&gt;//&lt;br /&gt;// Notes: &lt;br /&gt;//   (*) If no key is specified, the assembly is not signed.&lt;br /&gt;//   (*) KeyName refers to a key that has been installed in the Crypto Service&lt;br /&gt;//       Provider (CSP) on your machine. KeyFile refers to a file which contains&lt;br /&gt;//       a key.&lt;br /&gt;//   (*) If the KeyFile and the KeyName values are both specified, the &lt;br /&gt;//       following processing occurs:&lt;br /&gt;//       (1) If the KeyName can be found in the CSP, that key is used.&lt;br /&gt;//       (2) If the KeyName does not exist and the KeyFile does exist, the key &lt;br /&gt;//           in the KeyFile is installed into the CSP and used.&lt;br /&gt;//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.&lt;br /&gt;//       When specifying the KeyFile, the location of the KeyFile should be&lt;br /&gt;//       relative to the project output directory which is&lt;br /&gt;//       %Project Directory%\obj\&lt;configuration&gt;. For example, if your KeyFile is&lt;br /&gt;//       located in the project directory, you would specify the AssemblyKeyFile &lt;br /&gt;//       attribute as [assembly: AssemblyKeyFile(&quot;..\\..\\mykey.snk&quot;)]&lt;br /&gt;//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework&lt;br /&gt;//       documentation for more information on this.&lt;br /&gt;//&lt;br /&gt;[assembly: AssemblyDelaySign(false)]&lt;br /&gt;[assembly: AssemblyKeyFile(&quot;AccountManager.key&quot;)]&lt;br /&gt;[assembly: AssemblyKeyName(&quot;&quot;)]&lt;br /&gt;&lt;br /&gt;[assembly: ApplicationName( &quot;COM+ Bank Server Account Manager&quot; )]&lt;br /&gt;[assembly: ApplicationActivation( ActivationOption.Server )]&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;In particular, pay attention to the fact that we specify a version number for this library using the AssemblyVersion attribute and also specify the assembly key file using the AssemblyKeyFile attribute. The ApplicationName attribute is self-explanatory. However, the attribute of special interest is the ApplicationActivation attribute. As you may know, MTS and COM+ applications may either be hosted as a Library (e.g., Activated in the Caller&#39;s process) or Server (e.g., Activated in a new instance of dllhost.exe). The default attribute is to configure your COM+ application as a Library. Here we want to explicitly set the activation option to be specified as ActivationOption.Server.&lt;br /&gt;&lt;br /&gt;6. Build the Project Files&lt;br /&gt;&lt;br /&gt;Build the files that make up the project.&lt;br /&gt;&lt;br /&gt;------ Rebuild All started: Project: BookKeeper, Configuration: Debug .NET ------&lt;br /&gt;&lt;br /&gt;Preparing resources...&lt;br /&gt;Updating references...&lt;br /&gt;Performing main compilation...&lt;br /&gt;&lt;br /&gt;Build complete -- 0 errors, 0 warnings&lt;br /&gt;Building satellite assemblies...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;------ Rebuild All started: Project: AccountManager, Configuration: Debug .NET ------&lt;br /&gt;&lt;br /&gt;Preparing resources...&lt;br /&gt;Updating references...&lt;br /&gt;Performing main compilation...&lt;br /&gt;&lt;br /&gt;Build complete -- 0 errors, 0 warnings&lt;br /&gt;Building satellite assemblies...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;---------------------- Done ----------------------&lt;br /&gt;&lt;br /&gt;Rebuild All: 2 succeeded, 0 failed, 0 skipped &lt;br /&gt;&lt;br /&gt;7. Deploy the component as a Shared Assembly and Configure it in the COM+ Catalog&lt;br /&gt;&lt;br /&gt;After you&#39;ve built the assembly, you can use the .NET Global Assembly Cache (GAC) utility to register this assembly into the GAC as shown below.&lt;br /&gt;&lt;br /&gt;Command Prompt &lt;br /&gt;C:\MyProjects\Cornucopia\COMplus\BankServer\AccountManager\bin\Debug&gt;gacutil /i Bank.dll&lt;br /&gt;&lt;br /&gt;Microsoft (R) .NET Global Assembly Cache Utility. Version 1.0.2914.16&lt;br /&gt;Copyright (C) Microsoft Corp. 1998-2001. All rights reserved.&lt;br /&gt;&lt;br /&gt;Assembly successfully added to the cache&lt;br /&gt;&lt;br /&gt;C:\MyProjects\Cornucopia\COMplus\BankServer\AccountManager\bin\Debug&gt;regsvcs /fc Bank.dll&lt;br /&gt;RegSvcs - .NET Services Installation Utility Version 1.0.2914.16&lt;br /&gt;Copyright (C) Microsoft Corp. 2000-2001. All rights reserved.&lt;br /&gt;&lt;br /&gt;Installed Assembly:&lt;br /&gt;Assembly: C:\MyProjects\Cornucopia\COMplus\BankServer\AccountManager\bin\Debug\Bank.dll&lt;br /&gt;Application: COM+ Bank Server Account Manager&lt;br /&gt;TypeLib: c:\myprojects\cornucopia\complus\bankserver\accountmanager\bin\debug\Bank.tlb&lt;br /&gt;&lt;br /&gt;C:\MyProjects\Cornucopia\COMplus\BankServer\AccountManager\bin\Debug&gt; &lt;br /&gt;&lt;br /&gt;Successful registration against the cache turns this component into a shared assembly. A version of this component is copied into the GAC so that even if you delete this file locally, you will still be able to run your client program. &lt;br /&gt;&lt;br /&gt;Configuring our Assembly in the COM+ Catalog&lt;br /&gt;&lt;br /&gt;Configuring a .NET assembly in the COM+ Catalog means, you need to generate a COM Type Library (tlbexp.exe), and register the type in the system registry (regasm.exe). You also have to make sure that you enter the right information into the COM+ Catalog (RegDB). Instead of using all these tools individually, the .NET SDK provides an additional tool called the Register Services utility (regsvcs.exe). This utility simplifies the process by making sure that all required details are taken care of in a single step. It performs the following functions:&lt;br /&gt;&lt;br /&gt;Our Assembly is loaded into memory &lt;br /&gt;Out Assembly is registered (e.g., just like using regasm.exe) &lt;br /&gt;A COM Type Library (.tlb file) is generated and registered (e.g., just like using tlbexp.exe) &lt;br /&gt;The generated COM Type Library is installed in the specified COM+ Application &lt;br /&gt;Our Components are configured according to the attributes that are specified in the type definitions &lt;br /&gt;If you notice carefully, when we use the regsvcs.exe utility, we specify the /fc option (find or create) to instruct the tool to build a new COM+ application if one does not currently exist.&lt;br /&gt;&lt;br /&gt;The Component Services Explorer&lt;br /&gt;&lt;br /&gt;Once you have done all this, you can open up the Windows 2000 Component Services Explorer and discover that your .NET Assembly is now recognized as valid COM+ Application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;While you explore the various property windows for this COM+ Application, you realize that the various attributes that you specified in the C# class have been used to configure our component in the COM+ Catalog. Right Click the Component and check out the Activation tab for example as shown in the screen shot below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above settings have been automatically configured based on the following class-level attributes that you set programmatically in your original C# class from lines 82-88 in the source code above.&lt;br /&gt;&lt;br /&gt;  /// Configure component&#39;s object pooling&lt;br /&gt;  [ ObjectPooling( MinPoolSize = 5, MaxPoolSize = 10, CreationTimeout = 20 ) ]&lt;br /&gt;  /// Specify COM+ Context Attributes&lt;br /&gt;  [ MustRunInClientContext( false ) ]&lt;br /&gt;  /// Enable event tracking&lt;br /&gt;  [ EventTrackingEnabled( true ) ]&lt;br /&gt;  /// Enable JITA for the component&lt;br /&gt;  [ JustInTimeActivation( true ) ]&lt;br /&gt;  /// Enable Construction String Support for the component&lt;br /&gt;  [ ConstructionEnabled( Enabled=true, Default=&quot;Gopalan&#39;s Bank Server&quot; ) ]&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Now you need to build a client application that can access this COM+ Server component.</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/7277325486086979974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/7277325486086979974?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7277325486086979974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7277325486086979974'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2007/03/building-complete-com-server-component.html' title='Building a complete COM+ Server component using C# and .NET'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-6279166015908970267</id><published>2007-02-20T14:35:00.000+05:30</published><updated>2007-02-20T14:36:28.844+05:30</updated><title type='text'>Unsafe Code in C#</title><content type='html'>C# .net hides most of memory management, which makes it much easier for the developer. Thanks for the Garbage Collector and the use of references. But to make the language powerful enough in some cases in which we need direct access to the memory, unsafe code was invented.&lt;br /&gt;&lt;br /&gt;Commonly while programming in the .net framework we don?t need to use unsafe code, but in some cases there is no way not to, such as the following:&lt;br /&gt;&lt;br /&gt;    * Real-time applications, we might need to use pointers to enhance performance in such applications.&lt;br /&gt;    * External functions, in non-.net DLLs some functions requires a pointer as a parameter, such as Windows APIs that were written in C.&lt;br /&gt;    * Debugging, sometimes we need to inspect the memory contents for debugging purposes, or you might need to write an application that analyzes another application process and memory. &lt;br /&gt;&lt;br /&gt;Unsafe code is mostly about pointers which have the following advantages and disadvantages.&lt;br /&gt;&lt;br /&gt;Advantages of Unsafe Code in C#:&lt;br /&gt;&lt;br /&gt;    * Performance and flexibility, by using pointer you can access data and manipulate it in the most efficient way possible.&lt;br /&gt;    * Compatibility, in most cases we still need to use old windows APIs, which use pointers extensively. Or third parties may supply DLLs that some of its functions need pointer parameters. Although this can be done by writing the DLLImport declaration in a way that avoids pointers, but in some cases it?s just much simpler to use pointer.&lt;br /&gt;    * Memory Addresses, there is no way to know the memory address of some data without using pointers. &lt;br /&gt;&lt;br /&gt;Disadvantages of Unsafe Code in C#:&lt;br /&gt;&lt;br /&gt;    * Complex syntax, to use pointers you need to go throw more complex syntax than we used to experience in C#.&lt;br /&gt;    * Harder to use, you need be more careful and logical while using pointers, miss using pointers might lead to the following:&lt;br /&gt;          o Overwrite other variables.&lt;br /&gt;          o Stack overflow.&lt;br /&gt;          o Access areas of memory that doesn?t contain any data as they do.&lt;br /&gt;          o Overwrite some information of the code for the .net runtime, which will surely lead your application to crash. &lt;br /&gt;    * Your code will be harder to debug. A simple mistake in using pointers might lead your application to crash randomly and unpredictably.&lt;br /&gt;    * Type-safety, using pointers will cause the code to fail in the .net type-safety checks, and of course if your security police don?t allow non type-safety code, then the .net framework will refuse to execute your application. &lt;br /&gt;&lt;br /&gt; After we knew all the risks that might face us while using pointer and all the advantages those pointers introduces us of performance and flexibility, let us find now how to use them. The keyword unsafe is used while dealing with pointer, the name reflects the risks that you might face while using it. Let?s see where to place it. We can declare a whole class as unsafe:&lt;br /&gt;&lt;br /&gt;unsafe class Class1&lt;br /&gt;{&lt;br /&gt;//you can use pointers here!&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; Or only some class members can be declared as unsafe:&lt;br /&gt;&lt;br /&gt;class Class1&lt;br /&gt;{&lt;br /&gt;//pointer&lt;br /&gt;unsafe int * ptr;&lt;br /&gt;unsafe void MyMethod()&lt;br /&gt;{&lt;br /&gt;//you can use pointers here&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The same applies to other members such as the constructor and the properties.&lt;br /&gt;&lt;br /&gt;To declare unsafe local variables in a method, you have to put them in unsafe blocks as the following:&lt;br /&gt;&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;//can&#39;t use pointers here&lt;br /&gt;&lt;br /&gt;unsafe&lt;br /&gt;{&lt;br /&gt;//you can declare and use pointer here&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//can&#39;t use pointers here&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;You can?t declare local pointers in a ?safe? method in the same way we used in declaring global pointers, we have to put them in an unsafe block.&lt;br /&gt;&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;unsafe int * ptri; //Wrong&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If you got too excited and tried to use unsafe then when you compile the code just by using&lt;br /&gt;&lt;br /&gt;csc test.cs&lt;br /&gt;&lt;br /&gt;You will experience the following error:&lt;br /&gt;&lt;br /&gt;error CS0227: Unsafe code may only appear if compiling with /unsafe&lt;br /&gt;&lt;br /&gt;For compiling unsafe code use the /unsafe&lt;br /&gt;&lt;br /&gt;csc test.cs /unsafe&lt;br /&gt;&lt;br /&gt;In VS.net go to the project property page and in ?configuration properties&gt;build? set Allow Unsafe Code Blocks to True.&lt;br /&gt;&lt;br /&gt;After we knew how to declare a block as unsafe we should now learn how to declare and use pointers in it.&lt;br /&gt;&lt;br /&gt;Declaring pointers&lt;br /&gt;&lt;br /&gt;To declare a pointer of any type all what you have to do is to put ?*? after the type name such as&lt;br /&gt;&lt;br /&gt;int * ptri;&lt;br /&gt;&lt;br /&gt;double * ptrd;&lt;br /&gt;&lt;br /&gt;NOTE: If you used to use pointer in C or C++ then be careful that in C# int * ptri, i; ?*? applies to the type itself not the variable so ?i? is a pointer here as well, same as arrays.&lt;br /&gt;void Pointers&lt;br /&gt;&lt;br /&gt;If you want to declare a pointer, but you do not wish to specify a type for it, you can declare it as void.&lt;br /&gt;&lt;br /&gt;void *ptrVoid;&lt;br /&gt;&lt;br /&gt;The main use of this is if you need to call an API function than require void* parameters. Within the C# language, there isn?t a great deal that you can do using void pointers.&lt;br /&gt;Using pointers&lt;br /&gt;&lt;br /&gt;Using pointers can be demonstrated in the following example:&lt;br /&gt;&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int var1 = 5;&lt;br /&gt;&lt;br /&gt;unsafe&lt;br /&gt;{&lt;br /&gt;int * ptr1, ptr2;&lt;br /&gt;ptr1 = &amp;var1;&lt;br /&gt;ptr2 = ptr1;&lt;br /&gt;*ptr2 = 20;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Console.WriteLine(var1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The operator ?&amp;? means ?address of?, ptr1 will hold the address of var1, ptr2 = ptr1 will assign the address of var1, which ptr1 was holding, to ptr2. Using ?*? before the pointer name means ?the content of the address?, so 20 will be written where ptr2 points.&lt;br /&gt;&lt;br /&gt;Now var1 value is 20.&lt;br /&gt;sizeof operator&lt;br /&gt;&lt;br /&gt;As the name says, sizeof operator will return the number of bytes occupied of the given data type&lt;br /&gt;&lt;br /&gt;unsafe&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(&quot;sbyte: {0}&quot;, sizeof(sbyte));&lt;br /&gt;Console.WriteLine(&quot;byte: {0}&quot;, sizeof(byte));&lt;br /&gt;Console.WriteLine(&quot;short: {0}&quot;, sizeof(short));&lt;br /&gt;Console.WriteLine(&quot;ushort: {0}&quot;, sizeof(ushort));&lt;br /&gt;Console.WriteLine(&quot;int: {0}&quot;, sizeof(int));&lt;br /&gt;Console.WriteLine(&quot;uint: {0}&quot;, sizeof(uint));&lt;br /&gt;Console.WriteLine(&quot;long: {0}&quot;, sizeof(long));&lt;br /&gt;Console.WriteLine(&quot;ulong: {0}&quot;, sizeof(ulong));&lt;br /&gt;Console.WriteLine(&quot;char: {0}&quot;, sizeof(char));&lt;br /&gt;Console.WriteLine(&quot;float: {0}&quot;, sizeof(float));&lt;br /&gt;Console.WriteLine(&quot;double: {0}&quot;, sizeof(double));&lt;br /&gt;Console.WriteLine(&quot;decimal: {0}&quot;, sizeof(decimal));&lt;br /&gt;Console.WriteLine(&quot;bool: {0}&quot;, sizeof(bool));&lt;br /&gt;&lt;br /&gt;//did I miss something?!&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The output will be:&lt;br /&gt;&lt;br /&gt;sbyte: 1&lt;br /&gt;&lt;br /&gt;byte: 1&lt;br /&gt;&lt;br /&gt;short: 2&lt;br /&gt;&lt;br /&gt;ushort: 2&lt;br /&gt;&lt;br /&gt;int: 4&lt;br /&gt;&lt;br /&gt;uint: 4&lt;br /&gt;&lt;br /&gt;long: 8&lt;br /&gt;&lt;br /&gt;ulong: 8&lt;br /&gt;&lt;br /&gt;char: 2&lt;br /&gt;&lt;br /&gt;float: 4&lt;br /&gt;&lt;br /&gt;double: 8&lt;br /&gt;&lt;br /&gt;decimal: 16&lt;br /&gt;&lt;br /&gt;bool: 1&lt;br /&gt;&lt;br /&gt;Great, we don?t have to remember the size of every data type anymore!&lt;br /&gt;Casting Pointers&lt;br /&gt;&lt;br /&gt;A pointer actually stores an integer that represents a memory address, and it?s not surprising to know that you can explicitly convert any pointer to or from any integer type. The following code is totally legal.&lt;br /&gt;&lt;br /&gt;int x = 10;&lt;br /&gt;int *px;&lt;br /&gt;&lt;br /&gt;px = &amp;x;&lt;br /&gt;uint y = (uint) px;&lt;br /&gt;int *py = (int*) y;&lt;br /&gt;&lt;br /&gt;A good reason for casting pointers to integer types is in order to display them. Console.Write() and Console.WriteLine() methods do not have any overloads to take pointers. Casting a pointer to an integer type will solve the problem.&lt;br /&gt;&lt;br /&gt;Console.WriteLine(?The Address is: ? + (uint) px);&lt;br /&gt;&lt;br /&gt;As I mentioned before, it?s totally legal to cast a pointer to any integer type. But does that really mean that we can use any integer type for casting, what about overflows? On a 32-bit machine we can use uint, long and ulong where an address runs from zero to about 4 billion. And on a 64-bit machine we can only use ulong. Note that casting the pointer to other integer types is very likely to cause and overflow error. The real problem is that checked keyword doesn?t apply to conversions involving pointers. For such conversions, exceptions wont be raised when an overflow occur, even in a checked context. When you are using pointers the .net framework will assume that you know what you?re doing and you?ll be happy with the overflows!&lt;br /&gt;&lt;br /&gt;You can explicitly convert between pointers pointing to different types. For example:&lt;br /&gt;&lt;br /&gt;byte aByte = 8;&lt;br /&gt;byte *pByte = &amp;aByte;&lt;br /&gt;double *pDouble = (double*) pByte;&lt;br /&gt;&lt;br /&gt;This is perfectly legal code, but think twice if you are trying something like that. In the above example, the double value pointed to by pDouble will actually contain a byte (which is 8), combined by an area of memory contained a double, which surely won?t give a meaningful value. However, you might want to convert between types in order to implement a union, or you might want to cast pointers to other types into pointers to sbyte in order to examine individual bytes of memory.&lt;br /&gt;Pointers Arithmetic&lt;br /&gt;&lt;br /&gt;It?s possible to use the operators +, -, +=, -=, ++ and -- with pointers, with a long or ulong on the right-hand side of the operator. While it?s not permitted to do any operation on a void pointer.&lt;br /&gt;&lt;br /&gt;For example, suppose you have a pointer to an int, and you want to add 1 to it. The compiler will assume that you want to access the following int in the memory, and so will actually increase the value by 4 bytes, the size of int. If the pointer was pointing to a double, adding 1 will increase its value by 8 bytes the size of a double.&lt;br /&gt;&lt;br /&gt;The general rule is that adding a number X to a pointer to type T with a value P gives the result P + X *sizeof(T).&lt;br /&gt;&lt;br /&gt;Let?s have a look at the following example:&lt;br /&gt;&lt;br /&gt;uint u = 3;&lt;br /&gt;byte b = 8;&lt;br /&gt;double d = 12.5;&lt;br /&gt;uint *pU = &amp;u;&lt;br /&gt;byte *pB = &amp;b;&lt;br /&gt;double *pD = &amp;d;&lt;br /&gt;&lt;br /&gt;Console.WriteLine(&quot;Before Operations&quot;);&lt;br /&gt;Console.WriteLine(&quot;Value of pU:&quot; + (uint) pU);&lt;br /&gt;Console.WriteLine(&quot;Value of pB:&quot; + (uint) pB);&lt;br /&gt;onsole.WriteLine(&quot;Value of pD:&quot; + (uint) pD);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;pU += 5;&lt;br /&gt;pB -= 3;&lt;br /&gt;pD++;&lt;br /&gt;&lt;br /&gt;Console.WriteLine(&quot;\nAfter Operations&quot;);&lt;br /&gt;Console.WriteLine(&quot;Value of pU:&quot; + (uint) pU);&lt;br /&gt;Console.WriteLine(&quot;Value of pB:&quot; + (uint) pB);&lt;br /&gt;Console.WriteLine(&quot;Value of pD:&quot; + (uint) pD);&lt;br /&gt;&lt;br /&gt;The result is:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Before Operations&lt;br /&gt;Value of pU:1242784&lt;br /&gt;Value of pB:1242780&lt;br /&gt;Value of pD:1242772&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After Operations&lt;br /&gt;Value of pU:1242804&lt;br /&gt;Value of pB:1242777&lt;br /&gt;Value of pD:1242780&lt;br /&gt;&lt;br /&gt;5 * 4 = 20, where added to pU.&lt;br /&gt;&lt;br /&gt;3 * 1 = 3, where subtracted from pB.&lt;br /&gt;&lt;br /&gt;1 * 8 = 8, where added to pD.&lt;br /&gt;&lt;br /&gt;We can also subtract one pointer from another pointer, provided both pointers point to the same date type. This will result a long whose value is given by the difference between the pointers values divided by the size of the type that they represent:&lt;br /&gt;&lt;br /&gt;double *pD1 = (double*) 12345632;&lt;br /&gt;double *pD2 = (double*) 12345600;&lt;br /&gt;long L = pD1 ? pD2; //gives 4 =32/8(sizeof(double))&lt;br /&gt;&lt;br /&gt;Note that the way of initializing pointers in the example is totally valid.&lt;br /&gt;Pointers to Structs and Class members&lt;br /&gt;&lt;br /&gt;Pointers can point to structs the same way we used before as long as they don?t contain any reference types. The compiler will result an error if you had any pointer pointing to a struct containing a reference type.&lt;br /&gt;&lt;br /&gt;Let?s have an example,&lt;br /&gt;&lt;br /&gt;Suppose we had the following struct:&lt;br /&gt;&lt;br /&gt;struct MyStruct&lt;br /&gt;{&lt;br /&gt;public long X;&lt;br /&gt;public double D;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Declaring a pointer to it will be:&lt;br /&gt;&lt;br /&gt;MyStruct *pMyStruct;&lt;br /&gt;&lt;br /&gt;Initializing it:&lt;br /&gt;&lt;br /&gt;MyStruct myStruct = new MyStruct();&lt;br /&gt;pMyStruct = &amp; myStruct;&lt;br /&gt;&lt;br /&gt;To access the members:&lt;br /&gt;&lt;br /&gt;(*pMyStruct).X = 18;&lt;br /&gt;(*pMyStruct).D = 163.26;&lt;br /&gt;&lt;br /&gt;The syntax is a bit complex, isn?t it?&lt;br /&gt;&lt;br /&gt;That?s why C# defines another operator that allows us to access members of structs through pointers with a simpler syntax. The operator ?Pointer member access operator? looks like an arrow, it?s a dash followed by a greater than sign: -&gt;&lt;br /&gt;&lt;br /&gt;pMyStruct-&gt;X = 18;&lt;br /&gt;pMyStruct-&gt;D = 163.26;&lt;br /&gt;&lt;br /&gt;That looks better!&lt;br /&gt;&lt;br /&gt;Fields within the struct can also be directly accessed through pointer of their type:&lt;br /&gt;&lt;br /&gt;long *pL = &amp;(myStruct.X);&lt;br /&gt;double *pD = &amp;(myStruct.D);&lt;br /&gt;&lt;br /&gt;Classes and pointers is a different story. We already know that we can?t have a pointer pointing to a class, where it?s a reference type for sure. The Garbage Collector doesn?t keep any information about pointers, it?s only interested in references, so creating pointers to classes could cause the Garbage Collector to not work probably.&lt;br /&gt;&lt;br /&gt;On the other hand, class members could be value types, and it?s possible to create pointers to them. But this requires a special syntax. Remember that class members are embedded in a class, which sets in the heap. That means that they are still under the control of the Garbage Collector, which can at any time decide to move the class instance to a new location. The Garbage Collector knows about the reference, and will update its value, but again it?s not interested in the pointers around, and they will still be pointing to the old location.&lt;br /&gt;&lt;br /&gt;To avoid the risk of this problem, the compiler will result an error if you tried to create pointers pointing to class members in the same way we are using up to now.&lt;br /&gt;&lt;br /&gt;The way around this problem is by using the keyword ?fixed?. It marks out a block of code bounded by braces, and notifies the Garbage Collector that there may be pointers pointing to members of certain class instances, which must not be moved.&lt;br /&gt;&lt;br /&gt;Let?s have an example,&lt;br /&gt;&lt;br /&gt;Suppose the following class:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class MyClass&lt;br /&gt;{&lt;br /&gt;public long X;&lt;br /&gt;public double D;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Declaring pointers to its members in the regular way is a compile-time error:&lt;br /&gt;&lt;br /&gt;MyClass myClass = new MyClass();&lt;br /&gt;&lt;br /&gt;long *pX = &amp;(myClass.X); //compile-time error.&lt;br /&gt;&lt;br /&gt;To create pointers pointing to class members by using fixed keyword:&lt;br /&gt;&lt;br /&gt;fixed (long *pX = &amp;(myClass.X))&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;// use *pX here only.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The variable *pX is scoped within the fixed block only, and tells the garbage collector that not to move ?myClass? while the code inside the fixed block.&lt;br /&gt;stackalloc&lt;br /&gt;&lt;br /&gt;The keyword &quot;stackalloc&quot; commands the .net runtime to allocate a certain amount of memory on the stack. It requires two things to do so, the type (value types only) and the number of variables you?re allocating the stack for. For example if you want to allocate enough memory to store 4 floats, you can write the following:&lt;br /&gt;&lt;br /&gt;float *ptrFloat = stackalloc float [4];&lt;br /&gt;&lt;br /&gt;Or to allocate enough memory to store 50 shorts:&lt;br /&gt;&lt;br /&gt;short *ptrShort = stackalloc short [50];&lt;br /&gt;&lt;br /&gt;stackalloc simply allocates memory, it doesn?t initialize it to any value. The advantage of stackalloc is the ultra-high performance, and it?s up to you to initialize the memory locations that were allocated.&lt;br /&gt;&lt;br /&gt;A very useful place of stackalloc could be creating an array directly in the stack. While C# had made using arrays very simple and easy, it still suffers from the disadvantage that these arrays are actually objects instantiated from System.Array and they are stored on the heap with all of the overhead that involves.&lt;br /&gt;&lt;br /&gt;To create an array in the stack:&lt;br /&gt;&lt;br /&gt;int size;&lt;br /&gt;size = 6; //we can get this value at run-time as well.&lt;br /&gt;int *int_ary = stackalloc int [size];&lt;br /&gt;&lt;br /&gt;To access the array members, it?s very obvious to use *(int_ary + i), where ?i ?is the index. But it won?t be surprising to know that it?s also possible to use int_ary[i].&lt;br /&gt;&lt;br /&gt;*( int_ary + 0) = 5; //or *int_ary = 5;&lt;br /&gt;*( int_ary + 1) = 9; //accessing member #1&lt;br /&gt;*( int_ary + 2) = 16;&lt;br /&gt;&lt;br /&gt;int_ary[3] = 19; //another way to access members&lt;br /&gt;int_ary[4] = 7;&lt;br /&gt;int_ary[5] = 10;&lt;br /&gt;&lt;br /&gt;In a usual array, accessing a member outside the array bounds will cause an exception. But when using stackalloc, you?re simply accessing an address somewhere on the stack; writing on it could cause to corrupt a variable value, or worst, a return address from a method currently being executed.&lt;br /&gt;&lt;br /&gt;int[] ary = new int[6];&lt;br /&gt;ary[10] = 5;//exception thrown&lt;br /&gt;&lt;br /&gt;int *ary = stackalloc int [6];&lt;br /&gt;ary[10] = 5;// the address (ary + 10 * sizeof(int)) had 5 assigned to it.&lt;br /&gt;&lt;br /&gt;This takes us to the beginning to the article; using pointer comes with a cost. You have to be very certain of what you?re doing, any small error could cause very strange and hard to debug run-time bugs.</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/6279166015908970267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/6279166015908970267?isPopup=true' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/6279166015908970267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/6279166015908970267'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2007/02/unsafe-code-in-c.html' title='Unsafe Code in C#'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-1365544502753340250</id><published>2007-02-20T14:33:00.000+05:30</published><updated>2007-02-20T14:34:44.128+05:30</updated><title type='text'>Reading and Writing XML Files in C#</title><content type='html'>Typically, you use an XmlTextWriter if you need to write XML as raw data without the overhead of a DOM. The XmlTextWriter is an implementation of the XmlWriter class that provides the API which writes XML to file, stream, or a TextWriter. This class provides numerous validation and checking rules to ensure that the XML being written is well formed. When certain violations occur, exceptions are thrown and these exceptions should be handled. The XmlTextWriter has different constructors, each of which specifies a different type of the location to which to write the XML data. This sample uses the constructor that writes XML to a file. In particular, the following sample code constructs an XmlTextWriter with a string representing the file location for the newbooks.xml file.&lt;br /&gt;&lt;br /&gt;XmlTextWriter myXmlTextWriter = new XmlTextWriter (&quot;newbooks.xml&quot;, null);&lt;br /&gt; &lt;br /&gt;C# Code:&lt;br /&gt;myXmlTextWriter.Formatting = Formatting.Indented;&lt;br /&gt;myXmlTextWriter.WriteStartDocument(false);&lt;br /&gt;myXmlTextWriter.WriteDocType(&quot;bookstore&quot;, null, &quot;books.dtd&quot;, null);&lt;br /&gt;myXmlTextWriter.WriteComment(&quot;This file represents another fragment of a book store inventory database&quot;);&lt;br /&gt;myXmlTextWriter.WriteStartElement(&quot;bookstore&quot;);&lt;br /&gt;    myXmlTextWriter.WriteStartElement(&quot;book&quot;, null);&lt;br /&gt;        myXmlTextWriter.WriteAttributeString(&quot;genre&quot;,&quot;autobiography&quot;);&lt;br /&gt;        myXmlTextWriter.WriteAttributeString(&quot;publicationdate&quot;,&quot;1979&quot;);&lt;br /&gt;        myXmlTextWriter.WriteAttributeString(&quot;ISBN&quot;,&quot;0-7356-0562-9&quot;);&lt;br /&gt;        myXmlTextWriter.WriteElementString(&quot;title&quot;, null, &quot;The Autobiography of Mark Twain&quot;);&lt;br /&gt;        myXmlTextWriter.WriteStartElement(&quot;Author&quot;, null);&lt;br /&gt;            myXmlTextWriter.WriteElementString(&quot;first-name&quot;, &quot;Mark&quot;);&lt;br /&gt;            myXmlTextWriter.WriteElementString(&quot;last-name&quot;, &quot;Twain&quot;);&lt;br /&gt;        myXmlTextWriter.WriteEndElement();&lt;br /&gt;        myXmlTextWriter.WriteElementString(&quot;price&quot;, &quot;7.99&quot;);&lt;br /&gt;    myXmlTextWriter.WriteEndElement();&lt;br /&gt;myXmlTextWriter.WriteEndElement();&lt;br /&gt;&lt;br /&gt;//Write the XML to file and close the myXmlTextWriter&lt;br /&gt;myXmlTextWriter.Flush();&lt;br /&gt;myXmlTextWriter.Close();&lt;br /&gt;&lt;br /&gt;   In creating this element, the preceding sample code also shows how, for each XML node type, there is corresponding XML write method. For example, writing an element calls the WriteElementString method and writing an attribute calls the WriteAttributeString method. For nested levels, you use the WriteStartElement / WriteEndElement pair and, for more complex attribute creation, you can use the WriteStartAttribute / WriteEndAttribute pair.&lt;br /&gt;&lt;br /&gt;   When writing XML, notice how the sample code writes the XML declaration with the version &quot;1.0&quot; using the WriteStartDocument method. If you want the writer to check that the document is well formed (XML declaration first, DOCTYPE in prolog, only one root level element, and so on), you must call this optional WriteStartDocument method before calling any other write method. Next, the code calls the WriteDocType method to writes the document type with the name &quot;bookstore&quot;. The third parameter in the call to the WriteDocType specifies that the writer is to write SYSTEM &quot;books.dtd&quot;. By writing this, the XML file indicates that there is an external DTD to validate against.&lt;br /&gt;&lt;br /&gt;    Finally, the sample code calls the Flush method to persist the XML data to a file before calling the Close method. (While this sample only really requires the Close method, there are occasions where the XML generated needs to be persisted and the writer reused.)&lt;br /&gt;&lt;br /&gt;   To check the output from the XmlTextWriter, perform a round trip test by reading in the generated file with an XmlTextReader to validate that the XML is well formed.&lt;br /&gt;Reading Xml Files :  &lt;br /&gt;&lt;br /&gt;XmlReader class is the API that provides XML parsing, the XmlTextReader is the implementation designed to handle byte streams.&lt;br /&gt;&lt;br /&gt;Typically, you use the XmlTextReader if you need to access the XML as raw data without the overhead of a DOM. Not having to access the DOM results in a faster way to reading XML. For example, an XML document could have a header section used for routing the document for processing elsewhere. The XmlTextReader has different constructors to specify the location of the XML data. This sample loads XML from the books.xml file, as shown in the following code.&lt;br /&gt;XmlTextReader reader = new XmlTextReader (&quot;books.xml&quot;);&lt;br /&gt;Once loaded, the XmlTextReader moves across the XML data by using the Read method sequentially retrieving the next record from the document. The Read method returns false if there are no more records.&lt;br /&gt;while (reader.Read())&lt;br /&gt;{&lt;br /&gt;    // Do some work here on the data&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;   To process the XML data, each record has a node type that can be determined from the NodeType property. After the NodeType enumeration returns the node type, the sample tests the node type to see whether it is either an element or document type. If the node is either one of these two types, the sample processes the node using the Name and Value properties to display details about the node. The Name property returns the node name (for instance, the element and attribute names, while the Value property returns the node value (node text) of the current node (record).&lt;br /&gt;while (reader.Read())&lt;br /&gt;{&lt;br /&gt;    switch (reader.NodeType)&lt;br /&gt;    {&lt;br /&gt;        case XmlNodeType.Element: // The node is an Element&lt;br /&gt;            Console.Write(&quot;&lt;&quot; + reader.Name);&lt;br /&gt;            while (reader.MoveToNextAttribute()) // Read attributes&lt;br /&gt;                Console.Write(&quot; &quot; + reader.Name + &quot;=&#39;&quot; + reader.Value + &quot;&#39;&quot;);&lt;br /&gt;            Console.Write(&quot;&gt;&quot;);&lt;br /&gt;            break;&lt;br /&gt;        case XmlNodeType.DocumentType: // The node is a DocumentType&lt;br /&gt;            Console.WriteLine(NodeType + &quot;&lt;&quot; + reader.Name + &quot;&gt;&quot; + reader.Value);&lt;br /&gt;            break;&lt;br /&gt;        ...&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;   The XmlNodeType returned depends on the XmlReader class being used. For example, the XmlTextReader class never returns an XmlNodeType that is a Document, DocumentFragment, Entity, EndEntity and Notation node. See the .NET Framework Class Library for details on what XmlNodeType are returned by each XmlReader class.</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/1365544502753340250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/1365544502753340250?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1365544502753340250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/1365544502753340250'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2007/02/reading-and-writing-xml-files-in-c.html' title='Reading and Writing XML Files in C#'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9074536009245251286.post-7851733733587611010</id><published>2007-02-20T14:29:00.000+05:30</published><updated>2007-02-20T14:33:13.736+05:30</updated><title type='text'>Reading and Writing files using Microsoft .NET class libraries</title><content type='html'>Writing Text Files :&lt;br /&gt;&lt;br /&gt;Text files are the most common type of files. You can make text files in every editor, notepad is preferably used to make text files. The extension of the text file is .txt . Lets see what Microsoft .net class libraries provide us for writing and reading text files. Lets first make a simple interface that lets us enter some data in the multi-line textbox.&lt;br /&gt;Button Click Code:&lt;br /&gt;&lt;br /&gt;After making the interface let see some of the code. All the code in this example will be written in the Button click event handler since we want the file to be written when the button is clicked.&lt;br /&gt;// Don&#39;t forget to import System.IO namespace&lt;br /&gt;&lt;br /&gt;private void Button1_Click(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;          FileStream fs = File.Create(Server.MapPath(&quot;test.txt&quot;));&lt;br /&gt;    StreamWriter sw = new StreamWriter(fs);&lt;br /&gt;    sw.Write(TextBox1.Text);&lt;br /&gt;    sw.Close();&lt;br /&gt;    fs.Close();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;   As you can see the code is really simple. Lets examine the code and see what&#39;s going on.&lt;br /&gt;&lt;br /&gt;   1. First of all don&#39;t forget to import the System.IO namespace.&lt;br /&gt;   2. Make the object of FileStream class. The FileStream class is your best option when you don&#39;t care about the internal structure of the files with which you&#39;re working.&lt;br /&gt;   3. Next we make the object of the StreamWriter class. You can think of StreamWriter class as an additional layer of functionality on top of the FileStream class.&lt;br /&gt;   4. File.Create method makes a new file. The Server.MapPath means that file will be created in the virtual folder of IIS which will be located at C:\inetpub\wwwroot\YourProjectFolder\&lt;br /&gt;   5. Next we write the Text from the TextBox to the file using the StreamWriter Write method.&lt;br /&gt;   6. Finally and the most important step is to close the FileStream object explicitly using the Close method.&lt;br /&gt;&lt;br /&gt;There are many other ways of writing text to files. One of the way is to use the TextWriter class. For more information about the TextWriter class visit this link Reading Text Files :&lt;br /&gt;&lt;br /&gt;We have seen how we can write the Text Files lets see how we can read from the text files. Reading is also as simple as writing the text files. Lets look at the reading code below:&lt;br /&gt;private void Button1_Click(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;          FileStream  fs = File.OpenRead(Server.MapPath(&quot;test.txt&quot;)); &lt;br /&gt;      StreamReader sr = new StreamReader(fs);&lt;br /&gt;&lt;br /&gt;     while(sr.Peek() &gt; -1)&lt;br /&gt;       {&lt;br /&gt;          Response.Write(sr.ReadLine());&lt;br /&gt;      }&lt;br /&gt;      sr.Close();&lt;br /&gt;    fs.Close();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Lets see what the code does:&lt;br /&gt;&lt;br /&gt;   1. First we made the FileStream object and tells it to open the file &quot;test.txt&quot;.&lt;br /&gt;   2. We make the StreamReader object and tell it what FileStream to read.&lt;br /&gt;   3. The while loop checks the end of the file when the end of the file is reached sr.Peek() returns &#39;-1&#39; and the loop breaks.&lt;br /&gt;   4. Finally we close the StreamReader and FileStream objects.</content><link rel='replies' type='application/atom+xml' href='http://sharepointarrow.blogspot.com/feeds/7851733733587611010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9074536009245251286/7851733733587611010?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7851733733587611010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9074536009245251286/posts/default/7851733733587611010'/><link rel='alternate' type='text/html' href='http://sharepointarrow.blogspot.com/2007/02/reading-and-writing-files-using.html' title='Reading and Writing files using Microsoft .NET class libraries'/><author><name>Rahul Sharma</name><uri>http://www.blogger.com/profile/16782098981808947689</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyc9pj4sy7SkOFl53ssQf6Aqfb91QlbArzanlA7X81K6KrC_hi8jGpiZut1NQrX4HICZOw9zzbdKN6kxnogg4dUTshD-yijSwMWJQ8868cF-MInAH9MmYD06qU5xMx2w/s220/Rahul.jpg'/></author><thr:total>0</thr:total></entry></feed>