<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Doron Goldberg</title><subtitle type="html">agile .Net blog</subtitle><id>http://blogs.microsoft.co.il/blogs/dorong/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/" /><link rel="self" type="application/atom+xml" href="http://blogs.microsoft.co.il/blogs/dorong/atom.aspx" /><generator uri="http://communityserver.org" version="3.1.20917.1142">Community Server</generator><updated>2009-01-18T09:42:00Z</updated><entry><title>Help needed – MOSS list went crazy</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2010/03/16/help-needed-moss-list-went-crazy.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2010/03/16/help-needed-moss-list-went-crazy.aspx</id><published>2010-03-16T07:07:20Z</published><updated>2010-03-16T07:07:20Z</updated><content type="html">&lt;p&gt;Hi,&lt;/p&gt;  &lt;p&gt;After changing the EditForm.aspx &amp;amp; DispForm.aspx of a a list I’m working on something went terribly wrong:&lt;/p&gt;  &lt;p&gt;All the links directing to the view item form / edit form are pointing to the root site without the form itself.&lt;/p&gt;  &lt;p&gt;Meaning – instead of having a link to:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://myportal/mysubsite/Lists/MyList/DispForm.aspx?ID=1"&gt;http://myportal/mysubsite/Lists/MyList/DispForm.aspx?ID=1&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I now have links pointing:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://myportal/?ID=1"&gt;http://myportal/?ID=1&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Same goes for editing item – when clicking ‘Edit Item’ the page redirects to the main page.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Searching for the cause came up with several ideas,for &lt;a href="http://blogs.msdn.com/dszabo/archive/2007/02/20/custom-list-newform-aspx-ruined-in-wss-3-0.aspx" target="_blank"&gt;example&lt;/a&gt;, which none of them worked for me so far.&lt;/p&gt;  &lt;p&gt;(The main cause is SPD)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So…&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you ever came across such a case and have a solution to offer – Please let me know.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Thank you!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The display item form values in SPD are correct as far as SPD can tell.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update #2 – Solution:&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://sharepointworks.blogspot.com/2009/05/repairing-supporting-files-sharepoint.html" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=547919" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author></entry><entry><title>SharePoint developers required</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2010/02/08/sharepoint-developers-required.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2010/02/08/sharepoint-developers-required.aspx</id><published>2010-02-08T08:29:34Z</published><updated>2010-02-08T08:29:34Z</updated><content type="html">&lt;p&gt;&lt;b&gt;&lt;u&gt;&lt;a href="http://www.playtech.com/html/home"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ptLogo" border="0" alt="ptLogo" src="http://blogs.microsoft.co.il/blogs/dorong/ptLogo_2DC7A483.jpg" width="215" height="52" /&gt;&lt;/a&gt; &lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Job description&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The candidate will be responsible for the SharePoint at Playtech&lt;/p&gt;  &lt;p&gt;Implementation and maintenance tasks in the corporate Portal&lt;/p&gt;  &lt;p&gt;Providing services to the corporate reference and management&lt;/p&gt;  &lt;p&gt;Managing work with suppliers&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Requirements&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;At least 3 years experience in large scale SharePoint implementation.&lt;/p&gt;  &lt;p&gt;Proven experience in managing and maintaining enterprise portal based MOSS2007&lt;/p&gt;  &lt;p&gt;Practical knowledge on SharePoint Designer&lt;/p&gt;  &lt;p&gt;Knowledge of basic Web technologies HTML, CSS, etc.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Email me your CV if it interests you.&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=515385" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="Sharepoint" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Sharepoint/default.aspx" /><category term="offtopic" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/offtopic/default.aspx" /></entry><entry><title>Error in the Site Data Web Service. (Value does not fall within the expected range.)</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/09/24/error-in-the-site-data-web-service-value-does-not-fall-within-the-expected-range.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/09/24/error-in-the-site-data-web-service-value-does-not-fall-within-the-expected-range.aspx</id><published>2009-09-24T12:05:40Z</published><updated>2009-09-24T12:05:40Z</updated><content type="html">&lt;p&gt;After setting up a new web application for a new portal I faced a crawling problem of the new site collection.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Description:&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Right after starting the crawler it stops, giving 2-3 error messages, all with the same syntax:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Error in the Site Data Web Service. (Value does not fall within the expected range.)&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The crawl log was the only place the error was logged, with no additional information regarding the cause of the problem.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Searching the web came up with very little solutions, while only one of them seemed to apply to our case:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;1. stsadm -o export -url http://intranet/sites/it -filename D:\it.back.11.21.08.cmp -versions 2     &lt;br /&gt;2. Delete the site collection      &lt;br /&gt;3. stsadm -o import -url http://intranet/sites/it -filename D:\it.back.11.21.08.cmp -updateversions 2 –nofilecompression&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;(See &lt;a href="http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/4e339332-3ebf-4886-a92a-c6605145cabc" target="_blank"&gt;here&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;While option 1 and 3 are reasonable, deleting the site collection didn’t apply since the portal was already in production stage. (along with the fact faze 1 didn’t pass either due to some technical issues… so I had to look for a better way to solve the issue)&lt;/p&gt;  &lt;p&gt;After opening a support ticket, Microsoft’s support team came up with a nicer solution:&lt;/p&gt;  &lt;p&gt;&lt;u&gt;First of all, the cause behind this problem:&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Corrupted SIDs in the UserInfo table&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Solution:&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;1. Run the following sql query using your moss content database:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Select tp_login, tp_systemid, tp_deleted from userinfo where len(ltrim(rtrim(tp_systemid))) &amp;lt;25 and tp_deleted = 0&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;2. Give some kind of permissions to the root site of the site collection to all the users returned by the query, except system users: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;NT AUTHORITY\authenticated users     &lt;br /&gt;NT AUTHORITY\local service      &lt;br /&gt;NT AUTHORITY\system      &lt;br /&gt;SHAREPOINT\system&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;4. After the query returns no results (accept the system accounts) start a full crawl.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Notes: &lt;/p&gt;  &lt;p&gt;1. As for stage 2, you better test 2-3 users just to make sure that after you give them permissions to the root site they are infect removed from the query search results. &lt;/p&gt;  &lt;p&gt;2. By give permission I mean any type of permission, “read” is enough. While giving permissions to a user in the root level the SID is updated and fixed (somehow…).&lt;/p&gt;  &lt;p&gt;3. I had a local problem with some of the users which appeared in the returned result – I couldn’t add them to the site collection because they were deleted from the Active Directory (former employees) so simply had to delete them through the “People and Groups” of the site collection.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=412595" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="MOSS" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/MOSS/default.aspx" /><category term="Sharepoint" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Sharepoint/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/DEV/default.aspx" /><category term="TECH" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/TECH/default.aspx" /></entry><entry><title>Migrating Person list columns between web applications</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/09/10/migrating-person-list-columns-between-web-applications.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/09/10/migrating-person-list-columns-between-web-applications.aspx</id><published>2009-09-10T07:19:43Z</published><updated>2009-09-10T07:19:43Z</updated><content type="html">&lt;p&gt;A few days ago we started migrating a portal site from one web application to another on the same machine.&lt;/p&gt;  &lt;p&gt;As part of the migration process I needed to copy lists from the old site to the new site. Some lists, contained Person list columns, with single or multiple selection.&lt;/p&gt;  &lt;p&gt;While the migration went smoothly during the export/import process itself the result was weird – all the user names were altered on the new portal.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Reason: &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1. Person list columns store the user name (as text) and the user id from the profiles list.&lt;/p&gt;  &lt;p&gt;2. Each web application has it’s own profiles – with different user id’s given to each user.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Instead of starting to migrate the profiles from one portal to another I simply wrote a small utility which fix the Person columns of selected lists (imported ones) by taking the user id, getting the email of the user from the old portal, finding the new user id on the new portal and updating the list item:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;public partial class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Form1 &lt;/span&gt;: &lt;span style="color:#2b91af;"&gt;Form
&lt;/span&gt;{
    &lt;span style="color:blue;"&gt;private &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;MigrationField&lt;/span&gt;&amp;gt; _migrationfields;
    &lt;span style="color:blue;"&gt;private &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SPSite &lt;/span&gt;_sourcesite;
    &lt;span style="color:blue;"&gt;private &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SPList &lt;/span&gt;_targetlist;
    &lt;span style="color:blue;"&gt;private &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SPSite &lt;/span&gt;_targetsite;

    &lt;span style="color:blue;"&gt;public &lt;/span&gt;Form1()
    {
        InitializeComponent();
        Source.Text = &lt;span style="color:#2b91af;"&gt;Settings&lt;/span&gt;.Default[&lt;span style="color:#a31515;"&gt;&amp;quot;SourceSite&amp;quot;&lt;/span&gt;].ToString();
        Target.Text = &lt;span style="color:#2b91af;"&gt;Settings&lt;/span&gt;.Default[&lt;span style="color:#a31515;"&gt;&amp;quot;TargetSite&amp;quot;&lt;/span&gt;].ToString();
    }
    &lt;span style="color:blue;"&gt;private void &lt;/span&gt;btnVerifyColumns_Click(&lt;span style="color:blue;"&gt;object &lt;/span&gt;sender, &lt;span style="color:#2b91af;"&gt;EventArgs &lt;/span&gt;e)
    {
        _sourcesite = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt;(Source.Text);
        _targetsite = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SPSite&lt;/span&gt;(Target.Text);
        _targetlist = _targetsite.RootWeb.GetList(TargetListUrl.Text);
        _migrationfields = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;MigrationField&lt;/span&gt;&amp;gt;();
        Columns.Items.Clear();
        Log.Items.Clear();
        &lt;span style="color:blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;SPField &lt;/span&gt;field &lt;span style="color:blue;"&gt;in &lt;/span&gt;_targetlist.Fields)
        {
            &lt;span style="color:blue;"&gt;if &lt;/span&gt;(field.TypeAsString.Equals(&lt;span style="color:#a31515;"&gt;&amp;quot;User&amp;quot;&lt;/span&gt;) || field.TypeAsString.Equals(&lt;span style="color:#a31515;"&gt;&amp;quot;UserMulti&amp;quot;&lt;/span&gt;))
            {
                Columns.Items.Add(&lt;span style="color:#a31515;"&gt;&amp;quot;Field Name: &amp;quot; &lt;/span&gt;+ field.Title + &lt;span style="color:#a31515;"&gt;&amp;quot;, Multi:&amp;quot; &lt;/span&gt;+ field.TypeAsString.Equals(&lt;span style="color:#a31515;"&gt;&amp;quot;UserMulti&amp;quot;&lt;/span&gt;));
                _migrationfields.Add(&lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;MigrationField &lt;/span&gt;{ FieldName = field.Title, IsMulti = field.TypeAsString.Equals(&lt;span style="color:#a31515;"&gt;&amp;quot;UserMulti&amp;quot;&lt;/span&gt;) });
            }
        }
        btnMigrate.Enabled = &lt;span style="color:blue;"&gt;true&lt;/span&gt;;
    }

    &lt;span style="color:blue;"&gt;private string &lt;/span&gt;GetEmailFromSource(&lt;span style="color:blue;"&gt;string &lt;/span&gt;userid)
    {
        &lt;span style="color:blue;"&gt;if &lt;/span&gt;(!&lt;span style="color:#2b91af;"&gt;String&lt;/span&gt;.IsNullOrEmpty(userid))
            &lt;span style="color:blue;"&gt;return &lt;/span&gt;_sourcesite.RootWeb.SiteUsers.GetByID(&lt;span style="color:#2b91af;"&gt;Convert&lt;/span&gt;.ToInt32(userid)).Email;
        &lt;span style="color:blue;"&gt;return &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;String&lt;/span&gt;.Empty;
    }

    &lt;span style="color:blue;"&gt;private &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SPUser &lt;/span&gt;GetUserFromTarget(&lt;span style="color:blue;"&gt;string &lt;/span&gt;emailaddress)
    {
        &lt;span style="color:blue;"&gt;if &lt;/span&gt;(!&lt;span style="color:blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(emailaddress))
            &lt;span style="color:blue;"&gt;return &lt;/span&gt;_targetsite.RootWeb.SiteUsers.GetByEmail(emailaddress);
        &lt;span style="color:blue;"&gt;return null&lt;/span&gt;;
    }

    &lt;span style="color:blue;"&gt;private void &lt;/span&gt;btnMigrate_Click(&lt;span style="color:blue;"&gt;object &lt;/span&gt;sender, &lt;span style="color:#2b91af;"&gt;EventArgs &lt;/span&gt;e)
    {
        &lt;span style="color:blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;SPItem &lt;/span&gt;item &lt;span style="color:blue;"&gt;in &lt;/span&gt;_targetlist.Items)
        {
            &lt;span style="color:blue;"&gt;try
            &lt;/span&gt;{
                &lt;span style="color:blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;MigrationField &lt;/span&gt;field &lt;span style="color:blue;"&gt;in &lt;/span&gt;_migrationfields)
                {
                    &lt;span style="color:blue;"&gt;if &lt;/span&gt;(item[field.FieldName] != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)
                    {
                        &lt;span style="color:blue;"&gt;switch &lt;/span&gt;(field.IsMulti)
                        {
                            &lt;span style="color:blue;"&gt;case true&lt;/span&gt;:
                                &lt;span style="color:blue;"&gt;string&lt;/span&gt;[] userids = item[field.FieldName].ToString().Split(&lt;span style="color:#a31515;"&gt;&amp;#39;;&amp;#39;&lt;/span&gt;);
                                &lt;span style="color:blue;"&gt;var &lt;/span&gt;userscollection = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SPFieldUserValueCollection&lt;/span&gt;();

                                &lt;span style="color:blue;"&gt;for &lt;/span&gt;(&lt;span style="color:blue;"&gt;int &lt;/span&gt;i = 0; i &amp;lt; userids.Length; i += 2)
                                {
                                    &lt;span style="color:#2b91af;"&gt;SPUser &lt;/span&gt;user = GetUserFromTarget(GetEmailFromSource(userids[i].Replace(&lt;span style="color:#a31515;"&gt;&amp;quot;#&amp;quot;&lt;/span&gt;, &lt;span style="color:#a31515;"&gt;&amp;quot;&amp;quot;&lt;/span&gt;)));

                                    &lt;span style="color:blue;"&gt;if &lt;/span&gt;(user != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)
                                        userscollection.Add(&lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SPFieldUserValue&lt;/span&gt;(_targetsite.RootWeb, user.ID,
                                                                                 user.Name));
                                }
                                item[field.FieldName] = userscollection;
                                item.Update();
                                &lt;span style="color:blue;"&gt;break&lt;/span&gt;;
                            &lt;span style="color:blue;"&gt;case false&lt;/span&gt;:
                                &lt;span style="color:blue;"&gt;string &lt;/span&gt;email =
                                    GetEmailFromSource(item[field.FieldName].ToString().Substring(0,
                                                                                                  item[
                                                                                                      field.
                                                                                                          FieldName]
                                                                                                      .
                                                                                                      ToString().
                                                                                                      IndexOf
                                                                                                      (&lt;span style="color:#a31515;"&gt;&amp;#39;;&amp;#39;&lt;/span&gt;)));
                                &lt;span style="color:#2b91af;"&gt;SPUser &lt;/span&gt;newuser = GetUserFromTarget(email);
                                &lt;span style="color:blue;"&gt;if &lt;/span&gt;(newuser != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)
                                {
                                    item[field.FieldName] = newuser;
                                    item.Update();
                                }

                                &lt;span style="color:blue;"&gt;break&lt;/span&gt;;
                        }
                    }
                }
            }
            &lt;span style="color:blue;"&gt;catch &lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;Exception &lt;/span&gt;ex)
            {
                Log.Items.Add(&lt;span style="color:#a31515;"&gt;&amp;quot;itemid &amp;quot; &lt;/span&gt;+ item.ID + &lt;span style="color:#a31515;"&gt;&amp;quot;: &amp;quot; &lt;/span&gt;+ ex.Message);
            }
        }
        &lt;span style="color:#2b91af;"&gt;MessageBox&lt;/span&gt;.Show(&lt;span style="color:#a31515;"&gt;&amp;quot;Done migrating&amp;quot;&lt;/span&gt;);
    }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;public class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;MigrationField
&lt;/span&gt;{
    &lt;span style="color:blue;"&gt;public string &lt;/span&gt;FieldName { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }
    &lt;span style="color:blue;"&gt;public bool &lt;/span&gt;IsMulti { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }
}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=401489" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="C#" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/C_2300_/default.aspx" /><category term="MOSS" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/MOSS/default.aspx" /><category term=".NET" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/.NET/default.aspx" /><category term="Sharepoint" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Sharepoint/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/DEV/default.aspx" /></entry><entry><title>In Private – is it?</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/08/11/in-private-is-it.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/08/11/in-private-is-it.aspx</id><published>2009-08-11T08:47:37Z</published><updated>2009-08-11T08:47:37Z</updated><content type="html">&lt;p&gt;A common thought is that in private browsing of IE 8 or incognito in chrome are meant to protect users from leaving their tracks behind.&lt;/p&gt;  &lt;p&gt;From &lt;a href="http://www.microsoft.com/windows/internet-explorer/features/safer.aspx" target="_blank"&gt;Microsoft&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“&lt;strong&gt;InPrivate Browsing&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;When checking e-mail at an Internet café or shopping for a gift on a family PC, you don&amp;#39;t want to leave any trace of specific web browsing activity. InPrivate Browsing in Internet Explorer 8 helps prevent your browsing history, temporary Internet files, form data, cookies, and usernames and passwords from being retained by the browser, leaving no evidence of your browsing or search history.“&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;From &lt;a href="http://www.google.com/support/chrome/bin/answer.py?hl=en&amp;amp;answer=95464" target="_blank"&gt;Google&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;“&lt;strong&gt;Explore Google Chrome features: Incognito mode (private browsing)&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt; &lt;a href="http://www.google.com/"&gt;&lt;/a&gt;  &lt;p&gt;&lt;em&gt;For times when you want to browse in stealth mode, for example, to plan surprises like gifts or birthdays, Google Chrome offers the incognito browsing mode.&lt;/em&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;em&gt;Webpages that you open and files downloaded while you are incognito aren&amp;#39;t recorded in your browsing and download histories. &lt;/em&gt;&lt;/li&gt;    &lt;li&gt;&lt;em&gt;All new cookies are deleted after you close the incognito window.”&lt;/em&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Is it?&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;1. Go to “C:\Documents and Settings\{user-name}\Application Data\Macromedia\Flash Player\#SharedObjects\{some-hash-code}” and delete the some-hash-code folder.&lt;/p&gt;  &lt;p&gt;2. Browse In-private using IE8 or Incognito using Chrome to some flash site (youtube for example)&lt;/p&gt;  &lt;p&gt;3. Close the browser&lt;/p&gt;  &lt;p&gt;4. See if the files were deleted…&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:8162e8c9-086e-4aac-a27a-bb74f5410fd4" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://www.youtube.com/v/Om1W5Nbwihk&amp;amp;hl=en"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/Om1W5Nbwihk&amp;amp;hl=en" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;(The same behavior was detected for Fire Fox’s private mode)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;So, what happened?&lt;/p&gt;  &lt;p&gt;It might be a bug or maybe some Macromedia workaround – In any case you should be more carful while browsing those flash sites. The files left behind are flash-cookies, sometimes saved in folders which renamed after the domain who created them…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;And final note regarding IE8 In-Private browsing:&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;(since I’m not fully familiar with the parallel options of chrome &amp;amp; fire fox I’m not relating to them in this paragraph) &lt;/p&gt;  &lt;p&gt;In-Private browsing feature is mainly focusing on protecting the user from being tracked &lt;strong&gt;by the server side, &lt;/strong&gt;and not being tracked on the client side.&lt;/p&gt;  &lt;p&gt;You should use In-Private browsing while trying to avoid sharing your information, such as browsing behavior, with 3rd party web sites of web sites you visit &lt;strong&gt;often &lt;/strong&gt;in regular mode. &lt;/p&gt;  &lt;p&gt;The discussed &amp;quot;”bug/feature/workaround” only make this argument more valuable.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;* I would like to thank &lt;a href="http://www.securityfocus.com/bid/28279" target="_blank"&gt;Shahar Bar&lt;/a&gt; for letting me know about the issue a while ago.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=377136" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="IE8" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/IE8/default.aspx" /><category term="TECH" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/TECH/default.aspx" /></entry><entry><title>IE8 ModalDialog returnValue problem</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/08/10/ie8-modaldialog-returnvalue-problem.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/08/10/ie8-modaldialog-returnvalue-problem.aspx</id><published>2009-08-10T09:32:02Z</published><updated>2009-08-10T09:32:02Z</updated><content type="html">&lt;p&gt;Using regular returnValue methods is not working anymore for IE8.&lt;/p&gt;  &lt;p&gt;While looking for the cause I came across a very nice and clean solution for doing that:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://my.opera.com/Aux/blog/2009/05/17/what-to-do-when-returnvalue-of-modal-window-always-returns-undefined-in-internet" target="_blank"&gt;IE8 ModalDialog returnValue&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=376914" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author></entry><entry><title>YNET may harm your computer!</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/06/14/ynet-may-harm-your-computer.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/06/14/ynet-may-harm-your-computer.aspx</id><published>2009-06-14T09:29:21Z</published><updated>2009-06-14T09:29:21Z</updated><content type="html">&lt;p&gt;Since yesterday I keep getting a red screen when I use chrome telling me YNET may harm my computer.&lt;/p&gt;  &lt;p&gt;The reason is elements from &lt;a href="http://www.qdigital.co.il"&gt;www.qdigital.co.il&lt;/a&gt; on the page which are marked as malware for some reason.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/ynet_2A9DEE50.jpg"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="ynet" border="0" alt="ynet" src="http://blogs.microsoft.co.il/blogs/dorong/ynet_thumb_0706E15A.jpg" width="644" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=337807" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="offtopic" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/offtopic/default.aspx" /></entry><entry><title>Can’t browse locally to your MOSS 2007?</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/04/19/can-t-browse-locally-to-your-moss-2007.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/04/19/can-t-browse-locally-to-your-moss-2007.aspx</id><published>2009-04-19T07:55:06Z</published><updated>2009-04-19T07:55:06Z</updated><content type="html">&lt;p&gt;In case you came across a situation where you suddenly can’t browse your MOSS 2007 application locally, but still can access remote MOSS servers while others can access your application remotely: &lt;/p&gt;  &lt;h1&gt;KB963027&lt;/h1&gt;  &lt;p&gt;The solutions are:&lt;/p&gt;  &lt;p&gt;1. Uninstall the update&lt;/p&gt;  &lt;p&gt;2. Use IE6…&lt;/p&gt;  &lt;p&gt;3. &lt;a href="http://support.microsoft.com/kb/963027/"&gt;http://support.microsoft.com/kb/963027/&lt;/a&gt; – read for more details&lt;/p&gt;  &lt;p&gt;For more information see also:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blog.mpecsinc.ca/2009/04/sbs-2008-ie-update-kb963027-breaks.html"&gt;http://blog.mpecsinc.ca/2009/04/sbs-2008-ie-update-kb963027-breaks.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://spiderwool.blogspot.com/"&gt;http://spiderwool.blogspot.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/blogs/bradley/archive/2009/04/16/sbs-2008-ie-update-kb963027-breaks-companyweb-access-from-the-server.aspx"&gt;http://msmvps.com/blogs/bradley/archive/2009/04/16/sbs-2008-ie-update-kb963027-breaks-companyweb-access-from-the-server.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Update: Another useful link:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://support.microsoft.com/kb/896861/en-us" href="http://support.microsoft.com/kb/896861/en-us"&gt;http://support.microsoft.com/kb/896861/en-us&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I would like to thank our people at &lt;a href="http://www.netwise.co.il" target="_blank"&gt;Netwise&lt;/a&gt;: Avi Haimovich &amp;amp; Rani Of for the useful research of that matter.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=271536" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="C#" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/C_2300_/default.aspx" /><category term="MOSS" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/MOSS/default.aspx" /><category term="Sharepoint" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Sharepoint/default.aspx" /><category term="IE8" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/IE8/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/DEV/default.aspx" /></entry><entry><title>“The file size exceeds the limit allowed and cannot be saved” when using ACT</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/04/06/the-file-size-exceeds-the-limit-allowed-and-cannot-be-saved-when-using-act.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/04/06/the-file-size-exceeds-the-limit-allowed-and-cannot-be-saved-when-using-act.aspx</id><published>2009-04-06T19:05:20Z</published><updated>2009-04-06T19:05:20Z</updated><content type="html">&lt;p&gt;When trying to use ACT 5.5 Internet Explorer Compatibility Tool I got the following message:&lt;/p&gt;  &lt;p&gt;“The file size exceeds the limit allowed and cannot be saved”&lt;/p&gt;  &lt;p&gt;You can read about the problem &lt;a href="http://support.microsoft.com/kb/954368" target="_blank"&gt;here&lt;/a&gt; and download the hotfix needed in order to fix it &lt;a href="http://support.microsoft.com/kb/950923/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=265422" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="IE8" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/IE8/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/DEV/default.aspx" /><category term="ACT" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/ACT/default.aspx" /></entry><entry><title>IE 8 XSS Filter – Detection and optional fix</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/04/06/ie-8-xss-filter-detection-and-optional-fix.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/04/06/ie-8-xss-filter-detection-and-optional-fix.aspx</id><published>2009-04-06T09:58:00Z</published><updated>2009-04-06T09:58:00Z</updated><content type="html">&lt;p&gt;While browsing using Internet Explorer 8, I received several times&amp;nbsp; xss filter notice saying: “Internet Explorer has modified this page to help prevent cross-site scripting” resulting an empty page, usually after trying to submit a form.&lt;/p&gt;
&lt;p&gt;Although this is a security issue handled by IE in order to protect the user, sometimes it is blocking legit sites trying to do legit operations.&lt;/p&gt;
&lt;p&gt;If you are a website owner and you received complains regarding this issue you can check your web site using &lt;a href="http://technet.microsoft.com/en-us/windows/aa905066.aspx" target="_blank"&gt;ACT 5.5&lt;/a&gt; AKA “Microsoft Application Compatibility Toolkit 5.5” which can be downloaded directly from &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=24da89e9-b581-47b0-b45e-492dd6da2971&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is the result when using the Internet Explorer Compatibility Test Tool an my example web site:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_7DDE0D55.png"&gt;&lt;img style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_690C14D5.png" width="513" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;As you can see the tool allows me to detect what happened and why during my browsing session inside my web site. (The tool also works on remote sites and can be used for solving other compatibility issues as well)&lt;/p&gt;
&lt;p&gt;As for my example, I used the one I found on MSDN – &lt;a href="http://msdn.microsoft.com/en-us/library/dd565647(VS.85).aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Resolution:&lt;/p&gt;
&lt;p&gt;1. Fix your code and make sure you don’t perform illegal operations such as cross site scripting.&lt;/p&gt;
&lt;p&gt;2. Ask you users to disable the xss filter on their machines (BAD!)&lt;/p&gt;
&lt;p&gt;3. Set this response header: “&lt;code&gt;X-XSS-Protection: 0&lt;/code&gt;” in order to disable this feature (BAD!)&lt;/p&gt;
&lt;p&gt;You can set the response header directly from the web.config by adding this section:&lt;/p&gt;
&lt;p&gt;&amp;lt;system.webServer&amp;gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;lt;httpProtocol&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customHeaders&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;clear /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name=&amp;quot; X-XSS-Protection&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customHeaders&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;/httpProtocol&amp;gt; &lt;br /&gt;&amp;lt;/system.webServer&amp;gt;&lt;/p&gt;
&lt;p&gt;Please make sure you read the MSDN article first so you’ll know exactly what the risks you are taking by doing so.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=265285" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="IE8" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/IE8/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/DEV/default.aspx" /><category term="XSS Filter" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/XSS+Filter/default.aspx" /></entry><entry><title>MOSS Search providers as feature</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/03/24/moss-search-providers-as-feature.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/03/24/moss-search-providers-as-feature.aspx</id><published>2009-03-24T12:27:00Z</published><updated>2009-03-24T12:27:00Z</updated><content type="html">&lt;p&gt;I managed to wrap both search provider into a feature so it will be easier to deploy them. The new feature includes a simple WebPart which displays link buttons for installing the providers.&lt;/p&gt;  &lt;p&gt;Installation process can be viewed here:&lt;/p&gt;  &lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:cecfae2f-7535-4d56-b596-a058a9d4a1e2" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;embed src="http://images.video.msn.com/flash/soapbox1_1.swf" quality="high" width="432" height="364" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://macromedia.com/go/getflashplayer" flashvars="c=v&amp;amp;v=8fea768d-fcd9-41e8-9b09-5855fda9cb1d&amp;amp;from=writer&amp;amp;mkt=en-US"&gt;&lt;/embed&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The entire solution can be downloaded &lt;a href="http://cid-0682db6bacc91fff.skydrive.live.com/self.aspx/.Public/MOSSSearchProviders.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In order to compile &lt;a href="http://cid-0682db6bacc91fff.skydrive.live.com/self.aspx/.Public/Netwise.zip" target="_blank"&gt;these&lt;/a&gt; files need to be copied into your Program Files/Netwise.&lt;/p&gt;  &lt;p&gt;(The wsp file in located inside wsp/Debug folder inside the project)&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=256969" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="C#" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/C_2300_/default.aspx" /><category term="MOSS" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/MOSS/default.aspx" /><category term="Features" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Features/default.aspx" /><category term="IE8" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/IE8/default.aspx" /><category term="Search Provider" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Search+Provider/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/DEV/default.aspx" /></entry><entry><title>MOSS Document Search Provider For IE8</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/03/02/moss-document-search-provider-for-ie8.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/03/02/moss-document-search-provider-for-ie8.aspx</id><published>2009-03-02T08:39:27Z</published><updated>2009-03-02T08:39:27Z</updated><content type="html">&lt;p&gt;This post is following the &lt;a href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/03/02/moss-people-search-provider-for-ie8.aspx" target="_blank"&gt;previous one&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In this post I will demonstrate the second search provider for MOSS – the documents search provider for IE8.&lt;/p&gt;  &lt;p&gt;I will be using the same solution, using the same method so this time I will only demonstrate the changes between the two. (The HTML is the same HTML from the previous post)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The service&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The interface looks like this:&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;[ServiceContract]
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;interface&lt;/span&gt; IDocumentSearchService
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    [OperationContract]
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    [WebGet(UriTemplate = &amp;quot;&lt;span style="color:#8b0000;"&gt;/Search?q={word}&lt;/span&gt;&amp;quot;,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        BodyStyle = WebMessageBodyStyle.Bare)]
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    [XmlSerializerFormat]
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    SearchSuggestion Search(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; word);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Same as before, a single method with a single parameter.&lt;/p&gt;

&lt;p&gt;The Implementation:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; DocumentSearchService : IDocumentSearchService
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; XmlDocument xmlIconDoc;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    #region IDocumentSearchService Members
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SearchSuggestion Search(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; word)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        xmlIconDoc = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; XmlDocument();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        xmlIconDoc.Load(@&amp;quot;&lt;span style="color:#8b0000;"&gt;C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\XML\DOCICON.XML&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        var oFrt = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; FullTextSqlQuery(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPSite(ConfigurationManager.AppSettings[&amp;quot;&lt;span style="color:#8b0000;"&gt;server&lt;/span&gt;&amp;quot;]));
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.QueryText = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(ConfigurationManager.AppSettings[&amp;quot;&lt;span style="color:#8b0000;"&gt;DocumentsSearchQuery&lt;/span&gt;&amp;quot;].Replace(&amp;#39;@&amp;#39;, &amp;#39;&amp;quot;&lt;span style="color:#8b0000;"&gt;&amp;#39;), word);
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.ResultTypes = ResultType.RelevantResults | ResultType.SpecialTermResults;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.StartRow = 0;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.RowLimit = 10;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.TrimDuplicates = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        ResultTableCollection lstResults = &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        lstResults = oFrt.Execute();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        var ds = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; DataSet();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        ds.Tables.Add(&amp;quot;&lt;span style="color:#8b0000;"&gt;results&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        ds.Tables[&amp;quot;&lt;span style="color:#8b0000;"&gt;results&lt;/span&gt;&amp;quot;].Load(lstResults[ResultType.RelevantResults]);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        var results = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SearchSuggestion();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        results.Query = word;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (DataRow row &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; ds.Tables[&amp;quot;&lt;span style="color:#8b0000;"&gt;results&lt;/span&gt;&amp;quot;].Rows)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                results.Section.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Item
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            Text =  row[&amp;quot;&lt;span style="color:#8b0000;"&gt;title&lt;/span&gt;&amp;quot;] + &amp;quot;&lt;span style="color:#8b0000;"&gt; , &lt;/span&gt;&amp;quot; + row[&amp;quot;&lt;span style="color:#8b0000;"&gt;Author&lt;/span&gt;&amp;quot;] ,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            Description =
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                StripTagsRegex(row[&amp;quot;&lt;span style="color:#8b0000;"&gt;hithighlightedsummary&lt;/span&gt;&amp;quot;].ToString()),
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            Url = row[&amp;quot;&lt;span style="color:#8b0000;"&gt;path&lt;/span&gt;&amp;quot;].ToString(),
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            Image = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Image() 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            { Source = GetIcon(row[&amp;quot;&lt;span style="color:#8b0000;"&gt;FileExtension&lt;/span&gt;&amp;quot;].ToString()),
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                Height=16, Width=16 }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                        });
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; results;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; StripTagsRegex(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; text)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; Regex.Replace(text, &amp;quot;&lt;span style="color:#8b0000;"&gt;&amp;lt;.*?&amp;gt;&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;   
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; GetIcon(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; p)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (xmlIconDoc.SelectSingleNode(&amp;quot;&lt;span style="color:#8b0000;"&gt;//DocIcons/ByExtension/Mapping[@Key=&amp;#39;&lt;/span&gt;&amp;quot; + p.ToLower() + &amp;quot;&lt;span style="color:#8b0000;"&gt;&amp;#39;]&lt;/span&gt;&amp;quot;) != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ConfigurationManager.AppSettings[&amp;quot;&lt;span style="color:#8b0000;"&gt;server&lt;/span&gt;&amp;quot;] +
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    &amp;quot;&lt;span style="color:#8b0000;"&gt;/_layouts/images/&lt;/span&gt;&amp;quot; +
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    xmlIconDoc.SelectSingleNode(&amp;quot;&lt;span style="color:#8b0000;"&gt;//DocIcons/ByExtension/Mapping[@Key=&amp;#39;&lt;/span&gt;&amp;quot; +
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    p.ToLower() +
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    &amp;quot;&lt;span style="color:#8b0000;"&gt;&amp;#39;]&lt;/span&gt;&amp;quot;).Attributes[&amp;quot;&lt;span style="color:#8b0000;"&gt;Value&lt;/span&gt;&amp;quot;].Value;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ConfigurationManager.AppSettings[&amp;quot;&lt;span style="color:#8b0000;"&gt;server&lt;/span&gt;&amp;quot;] +
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    &amp;quot;&lt;span style="color:#8b0000;"&gt;/_layouts/images/&lt;/span&gt;&amp;quot; +
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    xmlIconDoc.SelectSingleNode(&amp;quot;&lt;span style="color:#8b0000;"&gt;//DocIcons/Default/Mapping&lt;/span&gt;&amp;quot;).Attributes[&amp;quot;&lt;span style="color:#8b0000;"&gt;Value&lt;/span&gt;&amp;quot;].Value;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; ex.Message;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;         
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    #endregion
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;As you can see this implementation is a little bit trickier.&lt;/p&gt;

&lt;p&gt;The query itself runs the same (different query of course), so does the building of the XML response.&lt;/p&gt;

&lt;p&gt;Two main differences are:&lt;/p&gt;

&lt;p&gt;1. I’m using StripTagsRegex method to remove tags from the search results because some of them are retuned with internal tagging. (the hithighlightedsummary field)&lt;/p&gt;

&lt;p&gt;As for the Image, I’m calling the GetIcon method which uses MOSS internal xml file for mapping file extensions and icons. I’m doing it this way so the user will have the exact same experience he gets while searching inside the portal.&lt;/p&gt;

&lt;p&gt;The file is usually located at:&lt;/p&gt;

&lt;p&gt;C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\XML\DOCICON.XML&lt;/p&gt;

&lt;p&gt;Depends on how you installed the server.&lt;/p&gt;

&lt;p&gt;This is a part of the file, just so you’ll know how the mapping goes:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_306D0CCA.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_7F8A555E.png" width="620" height="484" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;(This file is usually manually altered when installing new IFilters)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The XML defining the service&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;&lt;span style="color:#0000ff;"&gt;?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;OpenSearchDescription&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;http://a9.com/-/spec/opensearch/1.1/&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;ShortName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Documents Search&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;ShortName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Url&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;text/html&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;template&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;http://doron-g/searchcenter/Pages/Results.aspx?k={searchTerms}&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Url&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;application/x-suggestions+xml&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;template&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;http://localhost:52985/SearchProviders/DocumentSearchService.svc/Search?q={searchTerms}&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Image&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;height&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;16&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;width&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;16&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;image/icon&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;http://www.netwise.co.il/Images/favicon.ico
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Image&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;OpenSearchDescription&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;Same as before, two URL’s, one for redirecting when the user hits Enter and one for the service itself.&lt;/p&gt;

&lt;p&gt;The client side script can be found in the previous post.&lt;/p&gt;

&lt;p&gt;Adding the provider:&lt;/p&gt;

&lt;p&gt;Clicking the second button opens the add search providers dialog:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_0A6736A7.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_16F4E3C3.png" width="244" height="163" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;(Notice the Name label - “Document Search”)&lt;/p&gt;

&lt;p&gt;After adding the new provider it is now available in the search providers box, along with our people search provider and any other provider we have installed:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_154417EF.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_73E47252.png" width="244" height="162" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Selecting the documents search provider and typing a phrase will result a list of documents on the server which contains the phrase:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_5D42240B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_7082DAAA.png" width="244" height="210" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Hitting Enter will redirect me to the default search results page on my portal:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_20C9AF61.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_4BC19D66.png" width="644" height="458" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Clicking one of the search results in the providers search results will directly open the file without the need to actually navigate to the portal:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_1F74F0B5.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_56DB01E3.png" width="244" height="172" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;The entire solution can be downloaded from &lt;a href="http://cid-0682db6bacc91fff.skydrive.live.com/self.aspx/.Public/MOSSSearchProviders.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=239248" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="C#" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/C_2300_/default.aspx" /><category term="MOSS" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/MOSS/default.aspx" /><category term="IE8" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/IE8/default.aspx" /><category term="Search Provider" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Search+Provider/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/DEV/default.aspx" /></entry><entry><title>MOSS People Search Provider For IE8</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/03/02/moss-people-search-provider-for-ie8.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/03/02/moss-people-search-provider-for-ie8.aspx</id><published>2009-03-02T07:32:05Z</published><updated>2009-03-02T07:32:05Z</updated><content type="html">&lt;p&gt;In this post, and the one following it I will present two new search providers for MOSS 2007.&lt;/p&gt;  &lt;p&gt;Search provider is an old feature of common browsers, IE8 brings it into a new level with the extended visibility it provides for search results.&lt;/p&gt;  &lt;p&gt;You can read more about IE8 search providers &lt;a href="http://msdn.microsoft.com/en-us/library/cc848862.aspx" target="_blank"&gt;IE8 search provider&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The two search providers I will present will be:&lt;/p&gt;  &lt;p&gt;1. People search provider for searching people in the portal.&lt;/p&gt;  &lt;p&gt;2. Documents search provider for searching documents in the portal.&lt;/p&gt;  &lt;p&gt;As we all know MOSS comes with a build-in search capabilities which includes a search engine and a very nice UI for search queries and search results. These two new providers are intended to extend these capabilities so users can search the portal before they actually access it.&lt;/p&gt;  &lt;p&gt;My example is depending on &lt;a href="http://blogs.microsoft.co.il/blogs/bursteg/default.aspx" target="_blank"&gt;Guy Burstein&lt;/a&gt; &lt;a href="http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/12/17/building-an-ie8-visual-search-suggestion-provider-for-my-twitter-friends.aspx" target="_blank"&gt;twitter search provider&lt;/a&gt; and I thank him for his direction in writing this post.&lt;/p&gt;  &lt;p&gt;The example was developed as a regular service which has to be installed on the same machine where the portal is. It can be also deployed as a windows service exposing the service as WCF or as feature installed inside MOSS. In order to keep it simple I will only present the initial version.&lt;/p&gt;  &lt;p&gt;Search providers are combined of 3 main parts:&lt;/p&gt;  &lt;p&gt;1. The service&lt;/p&gt;  &lt;p&gt;2. The XML defining the service&lt;/p&gt;  &lt;p&gt;3. Client side script for installing the provider&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The service&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In order to search people inside the portal we must have a portal with indexed defined profiles. I won’t demonstrate how this is accomplished because it’s out of this post’s scope. In my example I simply imported the profiles from our Active Directory.&lt;/p&gt;  &lt;p&gt;The service itself contains 2 parts:&lt;/p&gt;  &lt;p&gt;1. Interface&lt;/p&gt;  &lt;p&gt;2. Implementation of that interface as a service&lt;/p&gt;  &lt;p&gt;The interface looks like this:&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;[ServiceContract]
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;interface&lt;/span&gt; IPeopleSearchService
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    [OperationContract]
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    [WebGet(UriTemplate = &amp;quot;&lt;span style="color:#8b0000;"&gt;/Search?q={friend}&lt;/span&gt;&amp;quot;,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        BodyStyle = WebMessageBodyStyle.Bare)]
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    [XmlSerializerFormat]
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    SearchSuggestion Search(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; friend);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;As you can see, a very simple interface with a single method the receives a single variable which is the phrase we will be searching.&lt;/p&gt;

&lt;p&gt;The Implementations:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; PeopleSearchService : IPeopleSearchService
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;{
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    #region IPeopleSearchService Members
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; SearchSuggestion Search(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; friend)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        var oFrt = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; FullTextSqlQuery(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SPSite(ConfigurationManager.AppSettings[&amp;quot;&lt;span style="color:#8b0000;"&gt;server&lt;/span&gt;&amp;quot;]));
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.QueryText = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Format(ConfigurationManager.AppSettings[&amp;quot;&lt;span style="color:#8b0000;"&gt;query&lt;/span&gt;&amp;quot;].Replace(&amp;#39;@&amp;#39;, &amp;#39;&amp;quot;&lt;span style="color:#8b0000;"&gt;&amp;#39;), friend);
&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.ResultTypes = ResultType.RelevantResults | ResultType.SpecialTermResults;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.StartRow = 0;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.RowLimit = 10;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        oFrt.TrimDuplicates = &lt;span style="color:#0000ff;"&gt;true&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        ResultTableCollection lstResults = &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        lstResults = oFrt.Execute();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        var ds = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; DataSet();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        ds.Tables.Add(&amp;quot;&lt;span style="color:#8b0000;"&gt;results&lt;/span&gt;&amp;quot;);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        ds.Tables[&amp;quot;&lt;span style="color:#8b0000;"&gt;results&lt;/span&gt;&amp;quot;].Load(lstResults[ResultType.RelevantResults]);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        var results = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; SearchSuggestion();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        results.Query = friend;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (DataRow row &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; ds.Tables[&amp;quot;&lt;span style="color:#8b0000;"&gt;results&lt;/span&gt;&amp;quot;].Rows)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;try&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (row[&amp;quot;&lt;span style="color:#8b0000;"&gt;pictureurl&lt;/span&gt;&amp;quot;] != &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; row[&amp;quot;&lt;span style="color:#8b0000;"&gt;pictureurl&lt;/span&gt;&amp;quot;].ToString() != &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    results.Section.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Item
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                Text = row[&amp;quot;&lt;span style="color:#8b0000;"&gt;title&lt;/span&gt;&amp;quot;] + &amp;quot;&lt;span style="color:#8b0000;"&gt; , &lt;/span&gt;&amp;quot; + row[&amp;quot;&lt;span style="color:#8b0000;"&gt;department&lt;/span&gt;&amp;quot;],
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                Description = row[&amp;quot;&lt;span style="color:#8b0000;"&gt;workphone&lt;/span&gt;&amp;quot;] + &amp;quot;&lt;span style="color:#8b0000;"&gt; , &lt;/span&gt;&amp;quot; + row[&amp;quot;&lt;span style="color:#8b0000;"&gt;workemail&lt;/span&gt;&amp;quot;],
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                Url = row[&amp;quot;&lt;span style="color:#8b0000;"&gt;path&lt;/span&gt;&amp;quot;] + Environment.NewLine + Environment.NewLine,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                Image =
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                    &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Image
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                        {Height = 48,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                            Width = 48,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                            Source = row[&amp;quot;&lt;span style="color:#8b0000;"&gt;pictureurl&lt;/span&gt;&amp;quot;].ToString()
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            });
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    results.Section.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Item
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                Text = row[&amp;quot;&lt;span style="color:#8b0000;"&gt;title&lt;/span&gt;&amp;quot;] + &amp;quot;&lt;span style="color:#8b0000;"&gt; , &lt;/span&gt;&amp;quot; + row[&amp;quot;&lt;span style="color:#8b0000;"&gt;department&lt;/span&gt;&amp;quot;],
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                Description = row[&amp;quot;&lt;span style="color:#8b0000;"&gt;workphone&lt;/span&gt;&amp;quot;] + &amp;quot;&lt;span style="color:#8b0000;"&gt; , &lt;/span&gt;&amp;quot; + row[&amp;quot;&lt;span style="color:#8b0000;"&gt;workemail&lt;/span&gt;&amp;quot;],
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                Url = row[&amp;quot;&lt;span style="color:#8b0000;"&gt;path&lt;/span&gt;&amp;quot;].ToString(),
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                       Image =
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                    &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Image { Height = 48,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                        Width = 48,
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                        Source = ConfigurationManager.AppSettings[&amp;quot;&lt;span style="color:#8b0000;"&gt;server&lt;/span&gt;&amp;quot;]+&amp;quot;&lt;span style="color:#8b0000;"&gt;/_layouts/images/no_pic.gif&lt;/span&gt;&amp;quot; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                                
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                                            });
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;catch&lt;/span&gt; (Exception ex)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                results.Section.Add(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Item {Text = ex.Message, Description = ex.StackTrace, Url = &amp;quot;&lt;span style="color:#8b0000;"&gt;&lt;/span&gt;&amp;quot;});
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; results;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    #endregion
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;}&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;As you can see I was using Guy’s search suggestions class to generate the response using search results coming from the query search results. (The query is defined in the web.config so it can be easily altered during development) You can change the fields you ask for in the query so you can present different content in the search results.&lt;/p&gt;

&lt;p&gt;I used title and department for the Text field and workphone + workemail for the Description field and the path as Url so clicking a search result will navigate to the personal page of the person.&lt;/p&gt;

&lt;p&gt;Image is set by the pictureurl in case the search result contains a pictureurl, otherwise the default image is presented.&lt;/p&gt;

&lt;p&gt;(Catch(Exception ex) returns the exception for debugging but it should be removed)&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The XML defining the service&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;?&lt;/span&gt;xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;&lt;span style="color:#0000ff;"&gt;?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;OpenSearchDescription&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;http://a9.com/-/spec/opensearch/1.1/&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;ShortName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;People Search&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;ShortName&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Url&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;text/html&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;template&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;http://doron-g/SearchCenter/Pages/peopleresults.aspx?k={searchTerms}&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Url&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;application/x-suggestions+xml&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;template&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;http://localhost:52985/SearchProviders/PeopleSearchService.svc/Search?q={searchTerms}&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Image&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;height&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;16&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;width&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;16&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;image/icon&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;http://www.netwise.co.il/Images/favicon.ico
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;  &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Image&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;OpenSearchDescription&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;The XML is the standard XML for search providers, which contains two URL’s – one for navigation in case the user hits Enter in the search box which navigates him to my portal’s default people’s search results page and one for the service which will be addressed while the user is typing inside the search box. (The service we created earlier)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Client side script&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;html&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;head&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;title&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;title&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;type&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        function Register() 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;{window.external.AddSearchProvider(&amp;#39;PeopleSuggestion.xml&amp;#39;);}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;function RegisterDocumentSearch() 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;{window.external.AddSearchProvider(&amp;#39;DocumentSuggestion.xml&amp;#39;);}
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;head&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;body&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;form&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;form1&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;button&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;onclick&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;#39;Register();&amp;#39;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;People Search&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;button&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;br&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;button&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;onclick&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;#39;RegisterDocumentSearch();&amp;#39;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;Document Search&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;button&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;form&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;body&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;html&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;The script is the standard script for adding search providers - window.external.AddSearchProvider with the XML location as a parameter.&lt;/p&gt;

&lt;p&gt;(This file contains both providers, the documents search provider will be presented in the next post)&lt;/p&gt;

&lt;p&gt;The entire solution looks like this: (For both services)&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_103903D5.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_752034C6.png" width="270" height="365" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;When browsing to Default.aspx we have two buttons, one for each search provider:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_138A75B0.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_38A7C01C.png" width="644" height="458" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Clicking the first button opens the add search providers dialog:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_28B87B58.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_4722BC41.png" width="244" height="163" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;(Notice the Use search suggestions from this provider check box – unique for IE8)&lt;/p&gt;

&lt;p&gt;After adding the provider it is now available for me on the search providers box:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_78EEFB82.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_37744929.png" width="244" height="154" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Selecting it and typing my name results like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_07D62A9D.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_06255EC9.png" width="244" height="118" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Searching other people, some with image and some without:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_248F9FB2.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_69C7F6DB.png" width="244" height="148" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Clicking a search result leads me directly to the person’s page:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_083237C5.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_2C771C47.png" width="644" height="458" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Hitting enter in the search box leads me to my portal’s people search results page:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_17A523C7.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_151BF209.png" width="644" height="458" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;I would like to thank &lt;a href="http://blogs.microsoft.co.il/blogs/yuvalk/" target="_blank"&gt;Yuval Korin&lt;/a&gt; for his help in creating this example.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=239202" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="C#" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/C_2300_/default.aspx" /><category term="MOSS" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/MOSS/default.aspx" /><category term="IE8" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/IE8/default.aspx" /><category term="Twitter" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Twitter/default.aspx" /><category term="Search Provider" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Search+Provider/default.aspx" /><category term="DEV" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/DEV/default.aspx" /></entry><entry><title>Changing settings forms / Adding new settings forms for MOSS 2007 - I</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/02/09/changing-settings-forms-adding-new-settings-forms-for-moss-2007.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/02/09/changing-settings-forms-adding-new-settings-forms-for-moss-2007.aspx</id><published>2009-02-09T10:17:29Z</published><updated>2009-02-09T10:17:29Z</updated><content type="html">&lt;p&gt;As already known, settings forms of MOSS 2007 can usually be found at:&lt;/p&gt;  &lt;p&gt;C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\LAYOUTS&lt;/p&gt;  &lt;p&gt;Each form (*.aspx file) can be accessed from any site on the portal inside /_layouts folder.&lt;/p&gt;  &lt;p&gt;for example:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://doron-g/_layouts/settings.aspx" href="http://doron-g/_layouts/settings.aspx"&gt;http://doron-g/_layouts/settings.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;and&lt;/p&gt;  &lt;p&gt;&lt;a title="http://doron-g/SiteDirectory/wiki/_layouts/settings.aspx" href="http://doron-g/SiteDirectory/wiki/_layouts/settings.aspx"&gt;http://doron-g/SiteDirectory/wiki/_layouts/settings.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Each showing the same form, exposing enabled featured for each site.&lt;/p&gt;  &lt;p&gt;In the following posts I will demonstrate how to add new forms to the _layouts folder and how to update (change) an existing form, both intended to extend share point elements to our needs.&lt;/p&gt;  &lt;p&gt;In this first example I will upgrade the ‘Title, Description and Icon’ site settings form to be ‘Site Type, title, Description and Icon’ so each site will now have a new setting field called ‘Site Type’. (in this example it will be drop down list for the simplicity of things, but it can be any thing you like – from a drop down list to a complex user control)&lt;/p&gt;  &lt;p&gt;The settings page is located in this address (can be accessed from the Site Settings):&lt;/p&gt;  &lt;p&gt;&lt;a title="http://doron-g/_layouts/prjsetng.aspx" href="http://doron-g/_layouts/prjsetng.aspx"&gt;http://doron-g/_layouts/prjsetng.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_47CD9B77.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_182F7CEB.png" width="644" height="417" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;CAUTION: The next steps will include changes in the prjsetng.aspx file – I advise you to keep copies of every file you change manually.&lt;/p&gt;  &lt;p&gt;Open the prjsetng.aspx file with any text editor and add the required code for generating the new “Site Type” section in the form:&lt;/p&gt;  &lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;wssuc&lt;/span&gt;:&lt;span style="color:#800000;"&gt;InputFormSection&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	&lt;span style="color:#ff0000;"&gt;Title&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Site Type&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	&lt;span style="color:#ff0000;"&gt;Id&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;idSiteType&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	&lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Template&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;_Description&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;		&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;literal&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;text&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Select site type&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;		 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Template&lt;/span&gt;_Description&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Template&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;_InputFormControls&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;		&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;wssuc&lt;/span&gt;:&lt;span style="color:#800000;"&gt;InputFormControl&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;LabelText&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Site type:&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;			&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Template&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;_Control&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;				&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;TABLE&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;border&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;cellpadding&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;cellspacing&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;dir&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;ltr&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;				&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;TR&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;nowrap&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;					&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;TD&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;class&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;ms-authoringcontrols&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;				
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;DropDownList&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;ID&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;SiteType&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Width&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;265&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;ListItem&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Text&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Normal Site&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Value&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;ListItem&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;ListItem&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Text&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Special Site&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Value&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;2&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;ListItem&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;ListItem&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Text&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;Very Special Site&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Value&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;ccc&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;ListItem&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;DropDownList&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;					&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;TD&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;				&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;TR&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;				&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;TABLE&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;			&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Template&lt;/span&gt;_Control&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;		&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#c71585;"&gt;wssuc&lt;/span&gt;:&lt;span style="color:#800000;"&gt;InputFormControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Template&lt;/span&gt;_InputFormControls&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#c71585;"&gt;wssuc&lt;/span&gt;:&lt;span style="color:#800000;"&gt;InputFormSection&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;This will generate the required drop down list with 3 options for our new site type property.&lt;/p&gt;

&lt;p&gt;Now we need to add the required code behind for saving the new field as part of the site properties.&lt;/p&gt;

&lt;p&gt;In order to do that we need to override the existing class which is handling the form with a new class of our own.&lt;/p&gt;

&lt;p&gt;To identify the current class we need to examine the original .aspx file’s header:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="background-color:#ffff00;color:black;"&gt;&amp;lt;%@ Assembly Name=&amp;quot;Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;%&amp;gt;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="background-color:#ffff00;color:black;"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; Inherits=&amp;quot;Microsoft.SharePoint.ApplicationPages.ProjectSettingsPage&amp;quot; MasterPageFile=&amp;quot;~/_layouts/application.master&amp;quot;      %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;These two lines tell us which class is used from which assembly. In this case ProjectSettingsPage from Microsoft.ShrePoint.ApplicationPages.&lt;/p&gt;

&lt;p&gt;Our new custom ProjectSettingsPage class will look like this (inside a simple class library project)&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; ProjectSettingsPage : Microsoft.SharePoint.ApplicationPages.ProjectSettingsPage
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnLoad(EventArgs e)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.OnLoad(e);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Page.IsPostBack)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (&lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.Web.Properties.ContainsKey(&amp;quot;&lt;span style="color:#8b0000;"&gt;SiteType&lt;/span&gt;&amp;quot;))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                    &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.SiteType.SelectedValue = &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.Web.Properties[&amp;quot;&lt;span style="color:#8b0000;"&gt;SiteType&lt;/span&gt;&amp;quot;];
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                }  
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;        }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;         &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; TextBox TxtSiteType { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;         &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; DropDownList SiteType { &lt;span style="color:#0000ff;"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff;"&gt;set&lt;/span&gt;; }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;         &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; BtnUpdateWebNew_Click(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; sender, EventArgs e)
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;         {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;             &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!&lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.Web.Properties.ContainsKey(&amp;quot;&lt;span style="color:#8b0000;"&gt;SiteType&lt;/span&gt;&amp;quot;))
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;             {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                 &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.Web.Properties.Add(&amp;quot;&lt;span style="color:#8b0000;"&gt;SiteType&lt;/span&gt;&amp;quot;, &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.SiteType.SelectedValue);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;             }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;             &lt;span style="color:#0000ff;"&gt;else&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;             {
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;                 &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.Web.Properties[&amp;quot;&lt;span style="color:#8b0000;"&gt;SiteType&lt;/span&gt;&amp;quot;] = &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.SiteType.SelectedValue;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;             }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;            
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;             &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.Web.Properties.Update();
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;             BtnUpdateWeb_Click(sender, e);
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;         }
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;     
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;    }&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;This code is simple asp.net code which saves the new property as site property and / or initialize the control with a default value (As seen in the OnLoad function). &lt;/p&gt;

&lt;p&gt;BtnUpdateWebNew_Click is for the OnClick event which will be generated by the OK button which saves the changes made.&lt;/p&gt;

&lt;p&gt;In order to connect the existing button with the new method another change is required in the .aspx file:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;wssuc&lt;/span&gt;:&lt;span style="color:#800000;"&gt;ButtonSection&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	   &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;Template&lt;/span&gt;&lt;span style="color:#ff0000;"&gt;_Buttons&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;		  &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#c71585;"&gt;asp&lt;/span&gt;:&lt;span style="color:#800000;"&gt;Button&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;UseSubmitBehavior&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;false&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;runat&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;		   &lt;span style="color:#ff0000;"&gt;class&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;ms-ButtonHeightWidth&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;OnClick&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;BtnUpdateWebNew_Click&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;		   &lt;span style="color:#ff0000;"&gt;Text&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;&amp;lt;%$Resources:wss,multipages_okbutton_text%&amp;gt;&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;id&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;BtnCreate&amp;quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;		   &lt;span style="color:#ff0000;"&gt;accesskey&lt;/span&gt;=&lt;span style="color:#0000ff;"&gt;&amp;quot;&amp;lt;%$Resources:wss,okbutton_accesskey%&amp;gt;&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;	   &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;Template&lt;/span&gt;_Buttons&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#c71585;"&gt;wssuc&lt;/span&gt;:&lt;span style="color:#800000;"&gt;ButtonSection&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;All we need to do is change the OnClick attribute to point the new method we created.&lt;/p&gt;

&lt;p&gt;(Our new method is saving the selected value of our new property and then calls the base class’s onclick method in order to save the original items of the form)&lt;/p&gt;

&lt;p&gt;In order to set the complete form to use our new class the following changes are rquired in the .aspx page header:&lt;/p&gt;

&lt;pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="background-color:#ffff00;color:black;"&gt;&amp;lt;%@ Assembly Name=&amp;quot;Netwise.MOSS.CustomPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef72d5cefb9f703d&amp;quot;%&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;span style="background-color:#ffff00;color:black;"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; Inherits=&amp;quot;Netwise.MOSS.CustomPages.ProjectSettingsPage&amp;quot; MasterPageFile=&amp;quot;~/_layouts/application.master&amp;quot;      %&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;pre style="background-color:#ffffff;margin:0em;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;font-size:12px;"&gt;&lt;/pre&gt;&lt;/pre&gt;

&lt;p&gt;So now our form is using our new class from out new assembly.&lt;/p&gt;

&lt;p&gt;Just copy the new .aspx file to the layouts folder and place the assembly in the GAC. (make sure you use the right publickeytoken, version and culture when you alter the page header)&lt;/p&gt;

&lt;p&gt;Our new settings form now looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/image_7A43C38D.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/dorong/image_thumb_6D696D6F.png" width="638" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;In the next post I will demonstrate how to create a new settings form so you won’t have to worry about changing the original forms and also have the ability to create custom settings sections for you MOSS application.&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=225561" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="C#" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/C_2300_/default.aspx" /><category term="MOSS" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/MOSS/default.aspx" /><category term=".NET" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/.NET/default.aspx" /><category term="Sharepoint" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Sharepoint/default.aspx" /></entry><entry><title>Web Slice Control adapter for MOSS 2007</title><link rel="alternate" type="text/html" href="http://blogs.microsoft.co.il/blogs/dorong/archive/2009/01/18/web-slice-control-adapter-for-moss-2007.aspx" /><id>http://blogs.microsoft.co.il/blogs/dorong/archive/2009/01/18/web-slice-control-adapter-for-moss-2007.aspx</id><published>2009-01-18T07:42:00Z</published><updated>2009-01-18T07:42:00Z</updated><content type="html">&lt;p&gt;This post is about enabling web slices on Microsoft Office SharePoint Server 2007.&lt;/p&gt;
&lt;p&gt;The following example will demonstrate how to easily implement a simple control adapter which will render the required html code for turning any web part on your server into a live web slice.&lt;/p&gt;
&lt;p&gt;First thing I did was creating a class called WebSliceAdapter which inherits from &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.ui.adapters.controladapter.aspx"&gt;ControlAdpater&lt;/a&gt;.&lt;/p&gt;
&lt;div&gt;
&lt;div style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;class&lt;/span&gt; WebSliceAdapter : ControlAdapter&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;ControlAdapter has a single method needs to be overridden:&lt;/p&gt;
&lt;div&gt;
&lt;div style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;protected&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;void&lt;/span&gt; Render(HtmlTextWriter writer)&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   3:&lt;/span&gt;     var webpart = Control &lt;span style="COLOR:#0000ff;"&gt;as&lt;/span&gt; WebPart;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (webpart != &lt;span style="COLOR:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   5:&lt;/span&gt;     {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   6:&lt;/span&gt;         &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (Page.Request.QueryString[&lt;span style="COLOR:#006080;"&gt;&amp;quot;sliceitem&amp;quot;&lt;/span&gt;] != &lt;span style="COLOR:#0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; Page.Request.QueryString[&lt;span style="COLOR:#006080;"&gt;&amp;quot;sliceitem&amp;quot;&lt;/span&gt;].Equals(webpart.ID))&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   7:&lt;/span&gt;         {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   8:&lt;/span&gt;             Page.Response.Clear();&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   9:&lt;/span&gt;             renderWebSlice(webpart, writer);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  10:&lt;/span&gt;             Page.Response.End();&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  11:&lt;/span&gt;         }&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  12:&lt;/span&gt;         &lt;span style="COLOR:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  13:&lt;/span&gt;         {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  14:&lt;/span&gt;             renderWebSlice(webpart, writer);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  15:&lt;/span&gt;         }&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  16:&lt;/span&gt;     }&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  17:&lt;/span&gt;     &lt;span style="COLOR:#0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  18:&lt;/span&gt;     {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  19:&lt;/span&gt;         &lt;span style="COLOR:#0000ff;"&gt;base&lt;/span&gt;.Render(writer);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  20:&lt;/span&gt;     }&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  21:&lt;/span&gt; }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;(I’m clearing the response and ending it because the webslice is not functioning well for some reason when the html it too large or because of the default&amp;nbsp; js &amp;amp; css of MOSS. I’m still trying to figure out why and how to overcome this)&lt;/p&gt;
&lt;p&gt;The following methods are rendering the required HTML code for the webslice surrounding the web part itself:&lt;/p&gt;
&lt;div&gt;
&lt;div style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;void&lt;/span&gt; renderWebSlice(WebPart webpart, HtmlTextWriter writer)&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   3:&lt;/span&gt;     writer.Write(getWebSliceHeader(webpart.ID, webpart.Title, 15));&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="COLOR:#0000ff;"&gt;base&lt;/span&gt;.Render(writer);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   5:&lt;/span&gt;     writer.Write(&lt;span style="COLOR:#006080;"&gt;&amp;quot;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;private&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; getWebSliceHeader(&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; id,&lt;span style="COLOR:#0000ff;"&gt;string&lt;/span&gt; title,&lt;span style="COLOR:#0000ff;"&gt;int&lt;/span&gt; refreshRate)&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   3:&lt;/span&gt;                  &lt;span style="COLOR:#0000ff;"&gt;return&lt;/span&gt; String.Format(&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   4:&lt;/span&gt;                     &lt;span style="COLOR:#006080;"&gt;@&amp;quot;&amp;lt;div class=&amp;#39;hslice&amp;#39; id=&amp;#39;hsliceitem{0}&amp;#39;&amp;gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   5:&lt;/span&gt;                         &amp;lt;a rel=&amp;#39;feedurl&amp;#39; href=&amp;#39;?sliceitem={0}&amp;#39;&amp;gt;&amp;lt;/a&amp;gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   6:&lt;/span&gt;                         &amp;lt;span style=&amp;#39;visibility:hidden;display:none;&amp;#39; class=&amp;#39;ttl&amp;#39;&amp;gt;{2}&amp;lt;/span&amp;gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   7:&lt;/span&gt;                         &amp;lt;span class=&amp;#39;entry-title&amp;#39; style=&amp;#39;visibility:hidden;display:none;&amp;#39;&amp;gt;{1}&amp;lt;/span&amp;gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   8:&lt;/span&gt;                         &amp;lt;div class=&amp;#39;entry-content&amp;#39;&amp;gt; &amp;quot;&lt;/span&gt;,&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   9:&lt;/span&gt;                     id, title, refreshRate.ToString());&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;getWebSliceHeader gets 3 parameters: id of the webslice, the title to display in the favorites bar and the refreshRate which configures the time in minutes for the webslice to be updated. Every time the content of the webslice will be changed the webslice will appear as bold in the favorites bar indicating the user an update is available.&lt;/p&gt;
&lt;p&gt;after signing the assembly and placing it into the GAC all is needed in order to make it work is a small change in the compat.browser file located under App_Browsers folder within the web application:&lt;/p&gt;
&lt;div style="BORDER-BOTTOM:gray 1px solid;BORDER-LEFT:gray 1px solid;PADDING-BOTTOM:4px;LINE-HEIGHT:12pt;BACKGROUND-COLOR:#f4f4f4;MARGIN:20px 0px 10px;PADDING-LEFT:4px;WIDTH:71.59%;PADDING-RIGHT:4px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;HEIGHT:196px;MAX-HEIGHT:200px;FONT-SIZE:8pt;OVERFLOW:auto;BORDER-TOP:gray 1px solid;CURSOR:text;BORDER-RIGHT:gray 1px solid;PADDING-TOP:4px;"&gt;
&lt;div style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;browser&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;refID&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;Default&amp;quot;&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;  &lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   2:&lt;/span&gt;   &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;controlAdapters&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   3:&lt;/span&gt;    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;adapter&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;controlType&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;Microsoft.SharePoint.WebPartPages.ContentEditorWebPart&amp;quot;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   4:&lt;/span&gt;             &lt;span style="COLOR:#ff0000;"&gt;adapterType&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;Netwise.MOSS.Extensions.ControlAdapters.WebSliceAdapter, Netwise.MOSS.Extensions.ControlAdapters, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4d08bf77f3d60265&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   5:&lt;/span&gt;    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;adapter&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;controlType&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;Microsoft.SharePoint.Publishing.WebControls.SummaryLinkWebPart,Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   6:&lt;/span&gt;             &lt;span style="COLOR:#ff0000;"&gt;adapterType&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;Netwise.MOSS.Extensions.ControlAdapters.WebSliceAdapter, Netwise.MOSS.Extensions.ControlAdapters, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4d08bf77f3d60265&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   7:&lt;/span&gt;    &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;adapter&lt;/span&gt; &lt;span style="COLOR:#ff0000;"&gt;controlType&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart,Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   8:&lt;/span&gt;             &lt;span style="COLOR:#ff0000;"&gt;adapterType&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;=&amp;quot;Netwise.MOSS.Extensions.ControlAdapters.WebSliceAdapter, Netwise.MOSS.Extensions.ControlAdapters, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4d08bf77f3d60265&amp;quot;&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:white;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;   9:&lt;/span&gt;   &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;controlAdapters&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;"&gt;&lt;span style="COLOR:#606060;"&gt;  10:&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR:#800000;"&gt;browser&lt;/span&gt;&lt;span style="COLOR:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Make sure to use full assembly names for every web part you wish to enable the adapter for. In this example I’m using the ContetEditorWebPart, SummaryLinkWebPart and the ContentByQueryWebPart.&lt;/p&gt;
&lt;p&gt;* In this example I’m enabling the adapter for all the browsers but you can / should use IE8 definition only.&lt;/p&gt;
&lt;p&gt;** Webslices use a different http header when they update so you might need to add a separate definition as well. &lt;/p&gt;
&lt;p&gt;This screen shot is from my MOSS homepage after enabling the adapter. This page contains 1 content query web part for showing me my tasks, a news list and a content editor web part. As you can see I now have 3 webslice feeds which I can see from the top bar and on the page itself:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/clip_image002_59535B31.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image002" border="0" alt="clip_image002" src="http://blogs.microsoft.co.il/blogs/dorong/clip_image002_thumb_6EF8E3F5.jpg" width="541" height="418" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/clip_image0024_0EE440F3.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image002[4]" border="0" alt="clip_image002[4]" src="http://blogs.microsoft.co.il/blogs/dorong/clip_image0024_thumb_3903C90E.jpg" width="559" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Adding the content editor web part:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/clip_image0026_44ACD443.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image002[6]" border="0" alt="clip_image002[6]" src="http://blogs.microsoft.co.il/blogs/dorong/clip_image0026_thumb_0A2CFEC9.jpg" width="644" height="391" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The webslices on the favorites bar:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/clip_image0028_372589CD.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image002[8]" border="0" alt="clip_image002[8]" src="http://blogs.microsoft.co.il/blogs/dorong/clip_image0028_thumb_6249D53A.jpg" width="644" height="451" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Viewing the content of the webslice:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/dorong/clip_image00210_4D0BA9C5.jpg"&gt;&lt;img style="BORDER-RIGHT-WIDTH:0px;DISPLAY:inline;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" title="clip_image002[10]" border="0" alt="clip_image002[10]" src="http://blogs.microsoft.co.il/blogs/dorong/clip_image00210_thumb_2E058627.jpg" width="644" height="392" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=213226" width="1" height="1"&gt;</content><author><name>dorong</name><uri>http://blogs.microsoft.co.il/members/dorong.aspx</uri></author><category term="MOSS" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/MOSS/default.aspx" /><category term="Sharepoint" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/Sharepoint/default.aspx" /><category term="IE8" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/IE8/default.aspx" /><category term="WebSlice" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/WebSlice/default.aspx" /><category term="controladapter" scheme="http://blogs.microsoft.co.il/blogs/dorong/archive/tags/controladapter/default.aspx" /></entry></feed>