<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sharepoint Server</title>
	<atom:link href="http://www.fivenumber.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fivenumber.com</link>
	<description>It&#039;s all about SharePoint</description>
	<lastBuildDate>Tue, 03 Jan 2012 16:33:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
<link>http://www.fivenumber.com</link>
<url>http://www.fivenumber.com/wp-content/mbp-favicon/5.jpg</url>
<title>Sharepoint Server</title>
</image>
		<item>
		<title>SharePoint Document Counter Counts The Document Downloads</title>
		<link>http://www.fivenumber.com/sharepoint-document-counter-counts-the-document-downloads/</link>
		<comments>http://www.fivenumber.com/sharepoint-document-counter-counts-the-document-downloads/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 19:26:36 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[SharePoint 2010 - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[download counter]]></category>
		<category><![CDATA[object model]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=914</guid>
		<description><![CDATA[In this post I&#8217;m going to show you how to count the document events of SharePoint site, after going through this post you will learn how to count the document downloads, views, updates, deletion, restoration etc. I remember this solution has been asked by few people on this blog. Before knowing the document events (add, [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;m going to show you how to count the document events of SharePoint site, after going through this post you will learn how to count the document downloads, views, updates, deletion, restoration etc.</p>
<p>I remember this solution has been asked by few people on this blog.</p>
<p>Before knowing the document events (add, delete, update, view etc) we have to configure the audit entry settings for the SharePoint site collection in site settings page under <strong>Site Collection Administration</strong> section (see figure 1)</p>
<div id="attachment_915" class="wp-caption aligncenter" style="width: 274px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/1.jpg" rel="lightbox[914]"><img class="size-medium wp-image-915" title="Figure 1 - Configure Site Collection Audit Settings" src="http://www.fivenumber.com/wp-content/uploads/2010/12/1-264x300.jpg" alt="Figure 1 - Configure Site Collection Audit Settings" width="264" height="300" /></a><p class="wp-caption-text">Figure 1 - Configure Site Collection Audit Settings</p></div>
<p>On <strong>Audit Settings</strong> page check the required events to track, in this example I&#8217;m configuring for <strong>Opening or downloading documents, viewing items in lists, or viewing item properties</strong>, <strong>Editing items</strong>, <strong>Deleting or restoring items</strong></p>
<div id="attachment_917" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/21.jpg" rel="lightbox[914]"><img class="size-medium wp-image-917" title="Figure 2 - Configure Audit Events" src="http://www.fivenumber.com/wp-content/uploads/2010/12/21-300x130.jpg" alt="Figure 2 - Configure Audit Events" width="300" height="130" /></a><p class="wp-caption-text">Figure 2 - Configure Audit Events</p></div>
<p>You can also configure audit entry settings programmatically with few lines of code, here it is:</p>
<pre class="brush: csharp; title: ; notranslate">
static void Main()
        {
            using (SPSite mySite = new SPSite(&quot;http://&lt;servername&gt;:port&quot;))
            {
                using (SPWeb myWeb = mySite.OpenWeb())
                {
                    mySite.Audit.AuditFlags = SPAuditMaskType.All; //Configures all settings

                    //you can even configure specific settings using the below lines of code

                    //mySite.Audit.AuditFlags = SPAuditMaskType.CheckIn | SPAuditMaskType.CheckOut | SPAuditMaskType.ChildDelete |
                    //     SPAuditMaskType.Copy | SPAuditMaskType.Delete | SPAuditMaskType.Move | SPAuditMaskType.ProfileChange |
                    //     SPAuditMaskType.SchemaChange | SPAuditMaskType.Search | SPAuditMaskType.SecurityChange |
                    //     SPAuditMaskType.Undelete | SPAuditMaskType.Update | SPAuditMaskType.View | SPAuditMaskType.Workflow;

                    //mySite.Audit.AuditFlags = SPAuditMaskType.None; //Configures to none
                    mySite.Audit.Update();

                }
            }
            Console.WriteLine(&quot;Press any key to continue.....&quot;);
            Console.ReadLine();
        }
</pre>
<p>After configuring the settings, SharePoint audits the library events on item viewing, downloading, editing, deleting etc.,<br />
SharePoint also generates audit log reports on this events in .CSV format. In this example we are reading the data from the configured audit entry logs to know event actions on documents.</p>
<p>Use the below code to know the event count on documents</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.ComponentModel;
using System.Web;
using System.Text;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace DownloadCounter.VisualWebPart1
{
    [ToolboxItemAttribute(false)]
    public class VisualWebPart1 : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        private const string _ascxPath = @&quot;~/_CONTROLTEMPLATES/DownloadCounter/DownloadCounterWebPart/DownloadCounterUserControl.ascx&quot;;
        SPGridView myGridView;
        SPDataSource myDataSource = new SPDataSource();
        string errorMessage = string.Empty;

        protected override void CreateChildControls()
        {
            Control control = Page.LoadControl(_ascxPath);
            Controls.Add(control);

            base.CreateChildControls();

            myGridView = new SPGridView();
            myGridView.AutoGenerateColumns = false;
            myGridView.Enabled = true;
            myGridView.AllowSorting = true;
            myGridView.AllowGrouping = true;
            myGridView.AllowGroupCollapse = true;
            myGridView.GroupField = &quot;Event&quot;;
            myGridView.DisplayGroupFieldName = false;
            myGridView.AllowPaging = true;
            myGridView.PageSize = 50;
            myGridView.PageIndexChanging += new GridViewPageEventHandler(myGridView_PageIndexChanging);

            BoundField colEvent = new BoundField();
            colEvent.DataField = &quot;Event&quot;;
            colEvent.HeaderText = &quot;Event&quot;;
            this.myGridView.Columns.Add(colEvent);

            BoundField colItemType = new BoundField();
            colItemType.DataField = &quot;ItemType&quot;;
            colItemType.HeaderText = &quot;ItemType&quot;;
            this.myGridView.Columns.Add(colItemType);

            BoundField colDocLocation = new BoundField();
            colDocLocation.DataField = &quot;DocLocation&quot;;
            colDocLocation.HeaderText = &quot;DocLocation&quot;;
            this.myGridView.Columns.Add(colDocLocation);

            BoundField colOccurred = new BoundField();
            colOccurred.DataField = &quot;Occurred&quot;;
            colOccurred.HeaderText = &quot;Occurred&quot;;
            this.myGridView.Columns.Add(colOccurred);

            BoundField colUserName = new BoundField();
            colUserName.DataField = &quot;UserName&quot;;
            colUserName.HeaderText = &quot;UserName&quot;;
            this.myGridView.Columns.Add(colUserName);

            Controls.Add(myGridView);
            myGridView.PagerTemplate = null;
            GetAudEntries();
            GroupByGridView();
        }
        private void GroupByGridView()
        {
            StringBuilder scriptFunction = new StringBuilder();
            scriptFunction.Append(&quot;&lt;script src='/SiteAssets/jquery-1.4.2.min.js' type='text/javascript'&gt;&lt;/script&gt;&quot;);
            scriptFunction.Append(&quot;&lt;script type='text/javascript'&gt;&quot;);
            scriptFunction.Append(&quot;$(document).ready(function(){$('.ms-gb').each(function(){var rowNums=$(this).nextUntil('.ms-gb').length;&quot;);
            scriptFunction.Append(&quot;$(this).children(0).append('('+rowNums+')');&quot;);
            scriptFunction.Append(&quot;$(this).children(0).children(0).trigger('onclick');&quot;);
            scriptFunction.Append(&quot;});&quot;);
            scriptFunction.Append(&quot;});&quot;);
            scriptFunction.Append(&quot;&lt;/script&gt;&quot;);
            Page.ClientScript.RegisterStartupScript(Page.GetType(), &quot;GroupBy&quot;, scriptFunction.ToString());
        }

        private void GetAudEntries()
        {
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                SPSite mySite = SPContext.Current.Site;
                SPWeb myWeb = SPContext.Current.Web;
                DataTable myDataTable = new DataTable();
                DataRow myRow;
                SPUser user;
                try
                {
                    SPAuditQuery wssQuery = new SPAuditQuery(mySite);
                    SPAuditEntryCollection auditCol = mySite.Audit.GetEntries(wssQuery);

                    myDataTable.Columns.Add(&quot;Event&quot;);
                    myDataTable.Columns.Add(&quot;ItemType&quot;);
                    myDataTable.Columns.Add(&quot;DocLocation&quot;);
                    myDataTable.Columns.Add(&quot;Occurred&quot;, typeof(DateTime));
                    myDataTable.Columns.Add(&quot;UserName&quot;);

                    foreach (SPAuditEntry entry in auditCol)
                    {
                        if (entry.DocLocation.EndsWith(&quot;.xls&quot;) || (entry.DocLocation.EndsWith(&quot;.doc&quot;)) || (entry.DocLocation.EndsWith(&quot;.ppt&quot;)))
                        {
                            user = myWeb.SiteUsers.GetByID(entry.UserId);
                            myRow = myDataTable.NewRow();
                            myRow[&quot;Event&quot;] = entry.Event;
                            myRow[&quot;ItemType&quot;] = entry.ItemType.ToString();
                            myRow[&quot;DocLocation&quot;] = entry.DocLocation;
                            myRow[&quot;Occurred&quot;] = entry.Occurred.ToLocalTime();
                            myRow[&quot;UserName&quot;] = user.ToString();
                            myDataTable.Rows.Add(myRow);
                        }
                    }
                    myGridView.DataSource = myDataTable;
                    myGridView.DataBind();
                }
                catch (Exception ex)
                {
                    errorMessage = ex.ToString();
                }
            });

        }
        void myGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            myGridView.PageIndex = e.NewPageIndex;
            myGridView.DataBind();
        }

        protected override void RenderContents(HtmlTextWriter writer)
        {
            writer.Write(errorMessage);
            EnsureChildControls();
            RenderChildren(writer);
        }
    }
}
</pre>
<p>Use the above code or try to deploy the <a title="SharePoint Download Counter" href="http://www.fivenumber.com/wp-content/uploads/2010/12/DownloadCounter.wsp" target="_blank">DownloadCounter.wsp</a><br />
<strong>Note</strong>: In the above code we have used JQuery jquery-1.4.2.min.js files to show the count of the group by field, so please download the jquery-1.4.2.min.js file from <a href="http://code.jquery.com/jquery-1.4.2.min.js" target="_blank">http://code.jquery.com/jquery-1.4.2.min.js</a> and place in some location of the SharePoint site and also refer the same source location in the above code, in this example I have placed the Jquery file in Site Assets library, you can even place in the same location if you don&#8217;t want to change the code.</p>
<p>After deploying the downloaded solution, please try to activate<strong> Download Counter Feature</strong> see figure 3</p>
<div id="attachment_918" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/3.jpg" rel="lightbox[914]"><img class="size-medium wp-image-918" title="Figure 3 - Activate Download Counter Feature" src="http://www.fivenumber.com/wp-content/uploads/2010/12/3-300x19.jpg" alt="Figure 3 - Activate Download Counter Feature" width="300" height="19" /></a><p class="wp-caption-text">Figure 3 - Activate Download Counter Feature</p></div>
<p>Then add the webpart to the page see figure 4</p>
<div id="attachment_919" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/4.jpg" rel="lightbox[914]"><img class="size-medium wp-image-919" title="Figure 4 - Adding Download Counter WebPart to SharePoint Site" src="http://www.fivenumber.com/wp-content/uploads/2010/12/4-300x219.jpg" alt="Figure 4 - Adding Download Counter WebPart to SharePoint Site" width="300" height="219" /></a><p class="wp-caption-text">Figure 4 - Adding Download Counter WebPart to SharePoint Site</p></div>
<p>Then you can view the webpart updating on every action of documents see figure 5</p>
<div id="attachment_920" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/5.jpg" rel="lightbox[914]"><img class="size-medium wp-image-920" title="Figure 5 - Download counter webPart shows the count of events for the documents" src="http://www.fivenumber.com/wp-content/uploads/2010/12/5-300x250.jpg" alt="Figure 5 - Download counter webPart shows the count of events for the documents" width="300" height="250" /></a><p class="wp-caption-text">Figure 5 - Download counter webPart shows the count of events for the documents</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/sharepoint-document-counter-counts-the-document-downloads/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Understanding SharePoint Delegate Control</title>
		<link>http://www.fivenumber.com/understanding-sharepoint-delegate-control/</link>
		<comments>http://www.fivenumber.com/understanding-sharepoint-delegate-control/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 15:25:51 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[SharePoint 2010 - Object Model]]></category>
		<category><![CDATA[delegates]]></category>
		<category><![CDATA[object model]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=901</guid>
		<description><![CDATA[In this article I’m going to explain about delegate control, before we jump start into the technical talk we will understand first what is the meaning of Delegates As I believe most of us we know that in general delegates are also called as ambassadors, diplomats, representatives etc. A delegate having high ranks has most [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I’m going to explain about delegate control, before we jump start into the technical talk we will understand first what is the meaning of <strong>Delegates</strong></p>
<p>As I believe most of us we know that in general delegates are also called as ambassadors, diplomats, representatives etc.</p>
<p>A delegate having high ranks has most importance for example ranks like 1, 2, 3. Rank1 delegate officer has most significant role than rank2 delegate officer.</p>
<p>There can be so many delegate officers or ambassadors serving for Country X <strong>for example:</strong> A delegate officer may look after the relations between Country X and Country A, another delegate ambassador may look after the relations between Country X and Country B, even some times the delegate officers have to visit to the Country A or Country B depending upon the call.</p>
<p>Now we will speak real technical vocabulary of delegates, SharePoint has a couple of delegate controls like</p>
<p>AdditionalPageHead<br />
GlobalSiteLink0<br />
GlobalSiteLink1<br />
GlobalSiteLink2<br />
PublishingConsole<br />
QuickLaunchDataSource<br />
SmallSearchInputBox<br />
TopNavigationDataSource</p>
<p>Apart from the above controls, we can also create our own custom delegate controls</p>
<p>The XML schema for delegate control is below:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt; &lt;Elements xmlns=&quot;http://schemas.microsoft.com/sharepoint/&quot;&gt;
 &lt;Control Id=&quot;SmallSearchInputBox&quot; Sequence=&quot;100&quot; Url=&quot;/templates/mysearchcontrol.ascx&quot;/&gt;
&lt;/Elements&gt;
</pre>
<p>In the above schema you can view the properties for the delegate control as <strong>Control Id</strong>, <strong>Sequence</strong> and <strong>URL</strong>. We identify the delegate controls based on <strong>Control Id</strong>, <strong>Sequence</strong> number. The <strong>Sequence</strong> number defines the rank of the delegate, <strong>URL</strong> describes the source location of the control.</p>
<p>As we discussed already above that “<em>Delegates having high ranks has most importance</em>” in the same way delegate control who’s <strong>Sequence</strong> id is less has most significant role in SharePoint site and will render on the site as first preference.</p>
<p>Also we have discussed that &#8220;<em>some times the delegate officers have to visit to the Country A or Country B depending upon the call</em>&#8221; in the same way if we have custom delegate control deployed on site and activated, the least Sequence control will load on site depending upon the user action.</p>
<p><strong>What is the use of delegate control?</strong><br />
Using the delegate control a developer can customize the SharePoint site controls without editing or even touching the master page.<br />
<strong>Note</strong>: We are not customizing the existing (default) delegate control but we are creating our own control loading onto the SharePoint site.</p>
<p>Let’s suppose assume one scenario, if we want to customize the SharePoint search box (by default SharePoint 2010 site has got input search box with one textbox and one button beside) see <strong>figure 1</strong></p>
<div id="attachment_902" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/1.gif" rel="lightbox[901]"><img class="size-medium wp-image-902" title="Figure 1 - SharePoint 2010 Default Search Box" src="http://www.fivenumber.com/wp-content/uploads/2010/12/1-300x118.gif" alt="Figure 1 - SharePoint 2010 Default Search Box" width="300" height="118" /></a><p class="wp-caption-text">Figure 1 - SharePoint 2010 Default Search Box</p></div>
<p>Now I will try to customize the default search box, the requirement is to display the search box with scope drop down list, and also customizing the search button image with a arrow image button.</p>
<p>First open Visual Studio 2010 and click <strong>New</strong> &gt; <strong>Project</strong> see <strong>figure 2</strong></p>
<div id="attachment_903" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/5.gif" rel="lightbox[901]"><img class="size-medium wp-image-903" title="Figure 2 - Creating New Visual Studio 2010 Project" src="http://www.fivenumber.com/wp-content/uploads/2010/12/5-300x184.gif" alt="Figure 2 - Creating New Visual Studio 2010 Project" width="300" height="184" /></a><p class="wp-caption-text">Figure 2 - Creating New Visual Studio 2010 Project</p></div>
<p>After project got created, I have deleted the not in use file (you can keep it there won&#8217;t be any problem if you don&#8217;t delete) because of maintaing clean solution I have removed user control, webpart related files see <strong>figure 3</strong></p>
<div id="attachment_904" class="wp-caption aligncenter" style="width: 248px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/9.gif" rel="lightbox[901]"><img class="size-medium wp-image-904" title="Figure 3 - Solution Explorer File Structure" src="http://www.fivenumber.com/wp-content/uploads/2010/12/9-238x300.gif" alt="Figure 3 - Solution Explorer File Structure" width="238" height="300" /></a><p class="wp-caption-text">Figure 3 - Solution Explorer File Structure</p></div>
<p>Then add the following code in Elements.xml file</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;Elements xmlns=&quot;http://schemas.microsoft.com/sharepoint/&quot; &gt;
  &lt;!--&lt;Module Name=&quot;VisualWebPart1&quot; List=&quot;113&quot; Url=&quot;_catalogs/wp&quot;&gt;
    &lt;File Path=&quot;VisualWebPart1\VisualWebPart1.webpart&quot; Url=&quot;CustomDelegateControl_VisualWebPart1.webpart&quot; Type=&quot;GhostableInLibrary&quot; &gt;
      &lt;Property Name=&quot;Group&quot; Value=&quot;Custom&quot; /&gt;
    &lt;/File&gt;
  &lt;/Module&gt;--&gt;
  &lt;Control
	 Id=&quot;SmallSearchInputBox&quot;
	 Sequence=&quot;23&quot;
	 ControlClass=&quot;Microsoft.SharePoint.Portal.WebControls.SearchBoxEx&quot;
	 ControlAssembly=&quot;Microsoft.Office.Server.Search, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot;&gt;
    &lt;Property Name=&quot;QueryPromptString&quot;&gt;This control is customized.....&lt;/Property&gt;
    &lt;Property Name=&quot;SearchBoxTableClass&quot;&gt;search-box&lt;/Property&gt;
    &lt;Property Name=&quot;GoImageUrl&quot;&gt;/_layouts/images/goviewfiles.png&lt;/Property&gt;
    &lt;Property Name=&quot;GoImageUrlRTL&quot;&gt;/_layouts/images/goviewfiles.png&lt;/Property&gt;
    &lt;Property Name=&quot;GoImageActiveUrl&quot;&gt;/_layouts/images/goviewfiles.png&lt;/Property&gt;
    &lt;Property Name=&quot;GoImageActiveUrlRTL&quot;&gt;/_layouts/images/goviewfiles.png&lt;/Property&gt;
    &lt;Property Name=&quot;UseSiteDefaults&quot;&gt;true&lt;/Property&gt;
    &lt;Property Name=&quot;FrameType&quot;&gt;None&lt;/Property&gt;
  &lt;/Control&gt;
&lt;/Elements&gt;
</pre>
<p>In the Element.xml file I have commented the <strong>Module</strong> section see <strong>figure 4</strong></p>
<div id="attachment_905" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/10.gif" rel="lightbox[901]"><img class="size-medium wp-image-905" title="Figure 4 - Custom Delegate Control Element.xml file" src="http://www.fivenumber.com/wp-content/uploads/2010/12/10-300x142.gif" alt="Figure 4 - Custom Delegate Control Element.xml file" width="300" height="142" /></a><p class="wp-caption-text">Figure 4 - Custom Delegate Control Element.xml file</p></div>
<p>Now we are almost done, try to build, deploy and activate the feature which will result in change of SharePoint default search box with your customized control on fly without modifying the master page see <strong>figure 5</strong></p>
<div id="attachment_906" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/12/3.gif" rel="lightbox[901]"><img class="size-medium wp-image-906" title="Figure 5 - SharePoint 2010 Custom Search Input Box" src="http://www.fivenumber.com/wp-content/uploads/2010/12/3-300x105.gif" alt="Figure 5 - SharePoint 2010 Custom Search Input Box" width="300" height="105" /></a><p class="wp-caption-text">Figure 5 - SharePoint 2010 Custom Search Input Box</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/understanding-sharepoint-delegate-control/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Most Common Custom WebParts Part 4 – Flash Media WebPart</title>
		<link>http://www.fivenumber.com/most-common-custom-webparts-part-4-%e2%80%93-flash-media-webpart/</link>
		<comments>http://www.fivenumber.com/most-common-custom-webparts-part-4-%e2%80%93-flash-media-webpart/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 21:33:53 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>
		<category><![CDATA[SharePoint 2010 - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=895</guid>
		<description><![CDATA[In my previous post you can view the most commonly used custom webparts, Tree View WebPart Shows Sites and Sub-Sites, Menu WebPart Shows Sites and Sub-Sites in Fly-Out Mode, Windows Media Player WebPart In this continuation series of most commonly used custom webparts, I come up with a simple Flash Player webpart which plays flash [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post you can view the most commonly used custom webparts, Tree View WebPart Shows Sites and Sub-Sites, Menu WebPart Shows Sites and Sub-Sites in Fly-Out Mode, Windows Media Player WebPart</p>
<p>In this continuation series of most commonly used custom webparts, I come up with a simple Flash Player webpart which plays flash files on Sharepoint sites, the webpart also supports to configure the properties as required.</p>
<p>Download the solution file <a title="Flash Media Player WebPart Solution" href="www.fivenumber.com/wp-content/uploads/2010/11/FlashWebPart.wsp" target="_blank">FlashWebPart.wsp</a></p>
<div id="attachment_896" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/18.jpg" rel="lightbox[895]"><img class="size-medium wp-image-896" title="Flash Media Player WebPart" src="http://www.fivenumber.com/wp-content/uploads/2010/11/18-300x218.jpg" alt="Flash Media Player WebPart" width="300" height="218" /></a><p class="wp-caption-text">Flash Media Player WebPart</p></div>
<div id="attachment_897" class="wp-caption aligncenter" style="width: 200px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/33.jpg" rel="lightbox[895]"><img class="size-medium wp-image-897" title="Flash Media Player WebPart Configuration" src="http://www.fivenumber.com/wp-content/uploads/2010/11/33-190x300.jpg" alt="Flash Media Player WebPart Configuration" width="190" height="300" /></a><p class="wp-caption-text">Flash Media Player WebPart Configuration</p></div>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace FlashWebPart.Flash
{
    [ToolboxItemAttribute(false)]
    public class Flash : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        //private const string _ascxPath = @&quot;~/_CONTROLTEMPLATES/FlashWebPart/Flash/FlashWebPartUserControl.ascx&quot;;

        private string flashFilePath = &quot;http://www.adobe.com/content/dam/Adobe/en/devnet/flash/samples/time_1/1_timer.swf&quot;;
        private string flashWidth = &quot;320&quot;;
        private string flashHeight = &quot;240&quot;;
        private string bgColor = string.Empty;
        private bool loopPlayBack = true;

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Specifies the media file location&quot;),
        Category(&quot;Flash Media Properties&quot;),
        WebDisplayName(&quot;Media File Location&quot;)]
        public string FlashFilePath
        {
            get { return flashFilePath; }
            set { flashFilePath = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Sets the width of the Media player&quot;),
        Category(&quot;Flash Media Properties&quot;),
        WebDisplayName(&quot;Width&quot;)]
        public string FlashWidth
        {
            get { return flashWidth; }
            set { flashWidth = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Sets the height of the Media player&quot;),
        Category(&quot;Flash Media Properties&quot;),
        WebDisplayName(&quot;Height&quot;)]
        public string FlashHeight
        {
            get { return flashHeight; }
            set { flashHeight = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Background Color: Specifies the back color&quot;),
        Category(&quot;Flash Media Properties&quot;),
        WebDisplayName(&quot;Background Color&quot;)]
        public string BGColor
        {
            get { return bgColor; }
            set { bgColor = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Loop Play Back: (True/False) Repeats the video automatically&quot;),
        Category(&quot;Flash Media Properties&quot;),
        WebDisplayName(&quot;Loop Play Back&quot;)]
        public bool LoopPlayBack
        {
            get { return loopPlayBack; }
            set { loopPlayBack = value; }
        }

        //protected override void CreateChildControls()
        //{
        //    Control control = Page.LoadControl(_ascxPath);
        //    Controls.Add(control);
        //}

        protected override void Render(HtmlTextWriter writer)
        {
            SPSite site = null;
            SPWeb web = SPContext.Current.Web;
            if (!string.IsNullOrEmpty(FlashFilePath) &amp;&amp; !string.IsNullOrEmpty(FlashWidth) &amp;&amp; !string.IsNullOrEmpty(FlashHeight))
            {
                try
                {
                    SPSecurity.RunWithElevatedPrivileges(delegate()
                    {
                        site = new SPSite(web.Site.ID);

                        using (site)
                        {
                            #region Script
                            writer.Write(&quot;&lt;OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='&quot; + FlashWidth + &quot;' height='&quot; + FlashWidth + &quot;'&gt;&quot;);
                            writer.Write(&quot;&lt;param name='movie' value='&quot; + FlashFilePath + &quot;'&gt;&quot;);
                            writer.Write(&quot;&lt;param name='bgcolor' value='&quot; + BGColor + &quot;'&gt;&quot;);
                            writer.Write(&quot;&lt;param name='loop' value='&quot; + LoopPlayBack + &quot;'&gt;&quot;);
                            writer.Write(&quot;&lt;EMBED src='&quot; + FlashFilePath + &quot;' quality='high' bgcolor='#FFFFFF' width='&quot; + FlashWidth + &quot;' height='&quot; + FlashHeight + &quot;' loop='&quot; + LoopPlayBack + &quot;' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'&gt;&quot;);
                            writer.Write(&quot;&lt;/EMBED&gt;&quot;);
                            writer.Write(&quot;&lt;/OBJECT&gt;&quot;);
                            #endregion
                        }
                    });
                }
                catch (Exception ex)
                {
                    writer.Write(ex.Message);
                }
            }
            else
            {
                writer.Write(&quot;&lt;span class='ms-formvalidation'&gt;&quot;);
                writer.Write(&quot;Please configure the &lt;B&gt;Media WebPart&lt;/B&gt; properties in webpart properties section&quot;);
                writer.Write(&quot;&lt;/span&gt;&quot;);
            }
        }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/most-common-custom-webparts-part-4-%e2%80%93-flash-media-webpart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Most Common Custom WebParts Part 3 – Windows OR YouTube Media Player WebPart</title>
		<link>http://www.fivenumber.com/most-common-custom-webparts-part-3-%e2%80%93-windows-media-player-webpart/</link>
		<comments>http://www.fivenumber.com/most-common-custom-webparts-part-3-%e2%80%93-windows-media-player-webpart/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 10:35:09 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[SharePoint 2010 - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=887</guid>
		<description><![CDATA[In my previous post you can view the most commonly used custom webparts, Tree View WebPart Shows Sites and Sub-Sites and Menu WebPart Shows Sites and Sub-Sites in Fly-Out Mode Now I got one more chance to continue the series of most commonly used custom webparts, so once again I come up with a simple [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post you can view the most commonly used custom webparts, <a title="Tree View WebPart Shows Sites and Sub-Sites" href="http://www.fivenumber.com/most-common-custom-webparts-part1-tree-view-webpart-shows-sites-and-sub-sites/" target="_blank">Tree View WebPart Shows Sites and Sub-Sites</a> and <a title="Menu WebPart Shows Sites and Sub-Sites in Fly-Out Mode" href="http://www.fivenumber.com/most-common-custom-webparts-part-2-%E2%80%93-menu-webpart-shows-sites-and-sub-sites-in-fly-out-mode/" target="_blank">Menu WebPart Shows Sites and Sub-Sites in Fly-Out Mode</a></p>
<p>Now I got one more chance to continue the series of most commonly used custom webparts, so once again I come up with a simple Windows Or Youtube Media Player webpart which plays video on Sharepoint sites, the webpart also supports to configure the properties as required.</p>
<p>In the webpart properties section please enter the Windows media or Youtube link, the webpart automatically detects the media type and plays accordingly</p>
<p>Download the solution file <a title="Windows OR Youtube Media WebPart Solution" href="http://fivenumber.com/wp-content/uploads/2012/01/WindowsORYouTubeMediaWebPart.wsp" target="_blank">WindowsORYouTubeMediaWebPart.wsp</a></p>
<div id="attachment_941" class="wp-caption aligncenter" style="width: 269px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/Windows-OR-YouTube-Player.png" rel="lightbox[887]"><img class="size-medium wp-image-941" title="Windows Or YouTube Player WebPart (Playing Windows media Video)" src="http://www.fivenumber.com/wp-content/uploads/2010/11/Windows-OR-YouTube-Player-259x300.png" alt="Windows Or YouTube Player WebPart (Playing Windows media Video)" width="259" height="300" /></a><p class="wp-caption-text">Windows Or YouTube Player WebPart (Playing Windows media Video)</p></div>
<div id="attachment_938" class="wp-caption aligncenter" style="width: 277px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/Windows-OR-YouTube-Player-WebPart.png" rel="lightbox[887]"><img class="size-medium wp-image-938 " title="Windows Or YouTube Player WebPart (Playing Youtube Video)" src="http://www.fivenumber.com/wp-content/uploads/2010/11/Windows-OR-YouTube-Player-WebPart-267x300.png" alt="Windows Or YouTube Player WebPart (Playing Youtube Video)" width="267" height="300" /></a><p class="wp-caption-text">Windows Or YouTube Player WebPart (Playing Youtube Video)</p></div>
<pre></pre>
<div id="attachment_943" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/Windows-OR-YouTube-Player-WebPart-Properties1.png" rel="lightbox[887]"><img class="size-medium wp-image-943" title="Windows Or YouTube Player WebPart Properties" src="http://www.fivenumber.com/wp-content/uploads/2010/11/Windows-OR-YouTube-Player-WebPart-Properties1-300x292.png" alt="Windows Or YouTube Player WebPart Properties" width="300" height="292" /></a><p class="wp-caption-text">Windows Or YouTube Player WebPart Properties</p></div>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace WindowsMediaWebPart.MediaWebPart
{
    [ToolboxItemAttribute(false)]
    public class WindowsMedia : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        //private const string _ascxPath = @&quot;~/_CONTROLTEMPLATES/WindowsMediaWebPart/MediaWebPart/MediaWebPartUserControl.ascx&quot;;

        private string videoFilePath = string.Empty;
        private string videoWidth = &quot;320&quot;;
        private string videoHeight = &quot;240&quot;;
        private bool animationAtStart = true;
        private bool transparentAtStart = true;
        private bool autoStart = true;
        private bool showControls = true;
        private bool loopPlayBack = true;
        private string frameBorder = &quot;0&quot;;

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Specifies the media file location&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Media File Location&quot;)]
        public string VideoFilePath
        {
            get { return videoFilePath; }
            set { videoFilePath = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Sets the width of the Media player&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Width&quot;)]
        public string VideoWidth
        {
            get { return videoWidth; }
            set { videoWidth = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Sets the height of the Media player&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Height&quot;)]
        public string VideoHeight
        {
            get { return videoHeight; }
            set { videoHeight = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Animation At Start: (True/False)&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Animation At Start&quot;)]
        public bool AnimationAtStart
        {
            get { return animationAtStart; }
            set { animationAtStart = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Transparent At Start: (True/False)&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Transparent At  Start&quot;)]
        public bool TransparentAtStart
        {
            get { return transparentAtStart; }
            set { transparentAtStart = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Auto Start: (True/False) Starts the video automatically&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Auto Start&quot;)]
        public bool AutoStart
        {
            get { return autoStart; }
            set { autoStart = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Show Controls: (True/False) Displays media player controls&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Show Controls&quot;)]
        public bool ShowControls
        {
            get { return showControls; }
            set { showControls = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Loop Play Back: (True/False) Repeats the video automatically&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Loop Play Back&quot;)]
        public bool LoopPlayBack
        {
            get { return loopPlayBack; }
            set { loopPlayBack = value; }
        }

        [WebBrowsable(true),
        Personalizable(PersonalizationScope.User),
        WebDescription(&quot;Sets the border of the media (applicable for youtube videos)&quot;),
        Category(&quot;Media Properties&quot;),
        WebDisplayName(&quot;Allow Full Screen&quot;)]
        public string FrameBorder
        {
            get { return frameBorder; }
            set { frameBorder = value; }
        }

        protected override void CreateChildControls()
        {
            //Control control = Page.LoadControl(_ascxPath);
            //Controls.Add(control);
            this.TitleUrl = VideoFilePath;
        }

        protected override void Render(HtmlTextWriter writer)
        {
            SPSite site = null;
            SPWeb web = SPContext.Current.Web;
            if (!string.IsNullOrEmpty(VideoFilePath) &amp;&amp; !string.IsNullOrEmpty(VideoWidth) &amp;&amp; !string.IsNullOrEmpty(VideoHeight))
            {
                try
                {
                    SPSecurity.RunWithElevatedPrivileges(delegate()
                    {
                        site = new SPSite(web.Site.ID);

                        using (site)
                        {
                            if ((videoFilePath.ToLower()).Contains(&quot;youtube.com/&quot;))
                            {
                                Uri youtubeUri = new Uri(videoFilePath);
                                string query = youtubeUri.Query;
                                string mediaID = HttpUtility.ParseQueryString(query).Get(&quot;v&quot;);
                                string source = &quot;http://www.youtube.com/embed/&quot; + mediaID;
                                writer.Write(&quot;&lt;iframe width='&quot; + VideoWidth + &quot;' height='&quot; + VideoHeight + &quot;' src='&quot; + source + &quot;' frameborder='&quot; + FrameBorder + &quot;' allowfullscreen&gt;&lt;/iframe&gt;&quot;);
                            }
                            else
                            {

                                writer.Write(&quot;&lt;OBJECT id='mediaPlayer' width='&quot; + VideoWidth + &quot;' height='&quot; + VideoHeight + &quot;' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'&gt;&quot;);
                                writer.Write(&quot;&lt;param name='fileName' value='&quot; + VideoFilePath + &quot;'&gt;&quot;);
                                writer.Write(&quot;&lt;param name='animationatStart' value='&quot; + AnimationAtStart + &quot;'&gt;&quot;);
                                writer.Write(&quot;&lt;param name='transparentatStart' value='&quot; + TransparentAtStart + &quot;'&gt;&quot;);
                                writer.Write(&quot;&lt;param name='autoStart' value='&quot; + AutoStart + &quot;'&gt;&quot;);
                                writer.Write(&quot;&lt;param name='showControls' value='&quot; + ShowControls + &quot;'&gt;&quot;);
                                writer.Write(&quot;&lt;param name='loop' value='&quot; + LoopPlayBack + &quot;'&gt;&quot;);
                                writer.Write(&quot;&lt;EMBED type='application/x-mplayer2'pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'id='windowsmediaPlayer' name='windowsmediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='&quot; + ShowControls + &quot;' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='&quot; + VideoWidth + &quot;' height='&quot; + VideoHeight + &quot;' src='&quot; + VideoFilePath + &quot;' autostart='&quot; + AutoStart + &quot;' designtimesp='5311' loop='&quot; + LoopPlayBack + &quot;'&gt;&lt;/EMBED&gt;&quot;);
                                writer.Write(&quot;&lt;/OBJECT&gt;&quot;);

                            }
                        }
                    });
                }
                catch (Exception ex)
                {
                    writer.Write(ex.Message);
                }
            }
            else
            {
                writer.Write(&quot;&lt;span class='ms-formvalidation'&gt;&quot;);
                writer.Write(&quot;Please configure the &lt;B&gt;Media WebPart&lt;/B&gt; properties in webpart properties section&quot;);
                writer.Write(&quot;&lt;/span&gt;&quot;);
            }
        }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/most-common-custom-webparts-part-3-%e2%80%93-windows-media-player-webpart/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Single Zone Split DNS</title>
		<link>http://www.fivenumber.com/single-zone-split-dns/</link>
		<comments>http://www.fivenumber.com/single-zone-split-dns/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 06:30:41 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - General]]></category>
		<category><![CDATA[Sharepoint 2010 - General]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=865</guid>
		<description><![CDATA[Single Zone Split DNS -  This terminology is not correlated to SharePoint, but still I want to post in my blog, since I had stretch lot of my time to configure forward lookup zones on my Windows Server 2008 R2. You may think why I want to configure forward lookup zones, that is not my [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Single Zone Split DNS</strong> -  This terminology is not correlated to SharePoint, but still I want to post in my blog, since I had stretch lot of my time to configure forward lookup zones on my Windows Server 2008 R2.</p>
<p>You may think why I want to configure forward lookup zones, that is not my job and it is related to Windows administrator (not SharePoint admin)</p>
<p>Let me illuminate the contextual background first</p>
<p>Just recently I bought a new laptop with Core i5 2.66 Ghz processor, installed memory of 6GB RAM, system type is 64 bit, I got the laptop with pre-installed OS Windows 7 however my idea is to create a server farm on single machine, so initially I have installed a fresh copy of Windows Server 2008 R2 Enterprise (still Windows 7 is there and has choice of selecting the operating system before booting, we can call it as dual boot machine)</p>
<p>After installing Windows Server 2008 R2 ENT, I have configured DNS (Domain Name System) then given <strong>FIVENUMBER.COM</strong> as domain name, my full computer name is <strong>SHAREPOINT.FIVENUMBER.COM</strong> (SHAREPOINT is my computer name, computer name + domain name = full computer name), then in Active Directory I have created two service accounts for SharePoint basically <strong>FIVENUMBER\SPAdmin</strong> and <strong>FIVENUMBER\SPService</strong></p>
<p>At that moment I have restarted the system and logged in with the newly created account <strong>FIVENUMBER\SPAdmin</strong></p>
<p>Then, I have installed SQL Server 2008 R2 Enterprise Edition, followed by SharePoint 2010 pre-requisites, we will get pre-requisite installer file within the SharePoint 2010 software, then last but not least I have installed my favorite SharePoint 2010 Enterprise Edition</p>
<p>Throughout the installation period the whole thing went smooth without a single problem, and then after I was on the go to configuring services and created the first web application on the new laptop, creation of web application was very fast and site accessing too, as it is recommended 4GB of RAM for developer or evaluation use for SharePoint 2010 (Please have a look at <a title="Hardware and software requirements for SharePoint 2010" href="http://technet.microsoft.com/en-us/library/cc262485.aspx" target="_blank">hardware and software requirements for SharePoint 2010</a>) but my laptop has 6GB of RAM then apparently it will be fast.</p>
<p>Now we will get into the real article.</p>
<p>After finalizing the installations and configurations on my new laptop, I assumed to access my blog site <a title="www.fivenumber.com" href="http://www.fivenumber.com" target="_blank">www.fivenumber.com</a>, as soon as I type the URL in the browser a windows authentication prompt appeared, look as if prompt for SharePoint sites, observing the prompt I stood shocked and I provided the user and password and then it navigated to the SharePoint site which is running on 80 port number, I have tried couple of times to access my blog site but continuously it prompts the box and takes me to SharePoint site, the blog site was working without any problem if I access from another PC, but I cannot access the blog site from my new laptop, then I become conscious that my domain name is also same as my blog site name</p>
<p>At that point I started Binging and came to identify that this is called as Single Zone Split DSN and can be fixed by configuring forward lookup zone, that means I have to create a new zone under forward lookup zone in the DNS manager, then I have to create a new host (A record), then followed by creating an Alias (CNAME)</p>
<p>Now we will see step by step how to add a forward lookup zone in Windows Server 2008 R2</p>
<p>Go to <strong>Start </strong>&gt; <strong>Administrative Tools</strong> &gt; <strong>DNS </strong>(see Figure 1)</p>
<div id="attachment_866" class="wp-caption aligncenter" style="width: 275px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/16.jpg" rel="lightbox[865]"><img class="size-medium wp-image-866" title="Figure 1 - Configuring Forward Lookup Zone" src="http://www.fivenumber.com/wp-content/uploads/2010/11/16-265x300.jpg" alt="Figure 1 - Configuring Forward Lookup Zone" width="265" height="300" /></a><p class="wp-caption-text">Figure 1 - Configuring Forward Lookup Zone</p></div>
<p>In <strong>DNS Manager</strong>, right click on <strong>Forward Lookup Zones</strong> and click on <strong>New Zone</strong> (see Figure 2)</p>
<div id="attachment_867" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/21.jpg" rel="lightbox[865]"><img class="size-medium wp-image-867" title="Figure 2 - Create New Zone" src="http://www.fivenumber.com/wp-content/uploads/2010/11/21-300x154.jpg" alt="Figure 2 - Create New Zone" width="300" height="154" /></a><p class="wp-caption-text">Figure 2 - Create New Zone</p></div>
<p>Then <strong>New Zone Wizard</strong> will start click <strong>Next </strong>(see Figure 3)</p>
<div id="attachment_868" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/31.jpg" rel="lightbox[865]"><img class="size-medium wp-image-868" title="Figure 3 - New Zone Wizard" src="http://www.fivenumber.com/wp-content/uploads/2010/11/31-300x229.jpg" alt="Figure 3 - New Zone Wizard" width="300" height="229" /></a><p class="wp-caption-text">Figure 3 - New Zone Wizard</p></div>
<p>Under <strong>Zone Type</strong> ensure that <strong>Primary Zone</strong> is selected and <strong>Store the zone in Active Directory</strong> is checked, click <strong>Next </strong>(see Figure 4)</p>
<div id="attachment_869" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/41.jpg" rel="lightbox[865]"><img class="size-medium wp-image-869" title="Figure 4 - Zone Type" src="http://www.fivenumber.com/wp-content/uploads/2010/11/41-300x229.jpg" alt="Figure 4 - Zone Type" width="300" height="229" /></a><p class="wp-caption-text">Figure 4 - Zone Type</p></div>
<p>Under <strong>Active Directory Zone Replication Scope</strong> ensure that <strong>To all DNS servers running on domain controllers in this domain &lt;</strong><em>domainname.com</em><strong>&gt; is selected</strong>, click <strong>Next</strong> (see Figure 5)</p>
<div id="attachment_870" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/52.jpg" rel="lightbox[865]"><img class="size-medium wp-image-870" title="Figure 5 - Active Directory Zone Replication Scope" src="http://www.fivenumber.com/wp-content/uploads/2010/11/52-300x229.jpg" alt="Figure 5 - Active Directory Zone Replication Scope" width="300" height="229" /></a><p class="wp-caption-text">Figure 5 - Active Directory Zone Replication Scope</p></div>
<p>Under <strong>Zone Name</strong>, please provide the domain name (for example: fivenumber.com), click <strong>Next</strong> (see Figure 6)</p>
<div id="attachment_871" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/61.jpg" rel="lightbox[865]"><img class="size-medium wp-image-871" title="Figure 6 - Zone Name" src="http://www.fivenumber.com/wp-content/uploads/2010/11/61-300x230.jpg" alt="Figure 6 - Zone Name" width="300" height="230" /></a><p class="wp-caption-text">Figure 6 - Zone Name</p></div>
<p>Under <strong>Dynamic Update</strong> ensure that <strong>Allow only secure dynamic updates is selected</strong>, click <strong>Next</strong> (see Figure 7)</p>
<div id="attachment_872" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/71.jpg" rel="lightbox[865]"><img class="size-medium wp-image-872" title="Figure 7 - Dynamic Update" src="http://www.fivenumber.com/wp-content/uploads/2010/11/71-300x229.jpg" alt="Figure 7 - Dynamic Update" width="300" height="229" /></a><p class="wp-caption-text">Figure 7 - Dynamic Update</p></div>
<p>We reached the final step in the wizard and can view <strong>Completing the New Zone Wizard</strong>, click <strong>Finish</strong> (see Figure <img src='http://www.fivenumber.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </p>
<div id="attachment_873" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/81.jpg" rel="lightbox[865]"><img class="size-medium wp-image-873" title="Figure 8 - Completing the New Zone Wizard" src="http://www.fivenumber.com/wp-content/uploads/2010/11/81-300x229.jpg" alt="Figure 8 - Completing the New Zone Wizard" width="300" height="229" /></a><p class="wp-caption-text">Figure 8 - Completing the New Zone Wizard</p></div>
<p>Now we have to create a new host under the new zone, to do that select the newly created created zone, in the DNS manager, then right click and click on <strong>New Host (A or AAA)</strong> to create the A record (see Figure 9)</p>
<p><strong>For your information</strong>: A record is an entrance in the DNS zone, that maps each domain to an IP address.</p>
<div id="attachment_874" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/91.jpg" rel="lightbox[865]"><img class="size-medium wp-image-874" title="Figure 9 - Creating New Host (A record)" src="http://www.fivenumber.com/wp-content/uploads/2010/11/91-300x183.jpg" alt="Figure 9 - Creating New Host (A record)" width="300" height="183" /></a><p class="wp-caption-text">Figure 9 - Creating New Host (A record)</p></div>
<p>In the <strong>New Host</strong> dialog box provide the name as <strong>www </strong>and <strong>IP address</strong> in the appropriate boxes and click <strong>Add Host</strong> (see Figure 10)</p>
<p><strong>Note</strong>: You will come to know the IP address of the site when you ping the site in command prompt</p>
<div id="attachment_875" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/101.jpg" rel="lightbox[865]"><img class="size-medium wp-image-875" title="Figure 10 - Creating New Host" src="http://www.fivenumber.com/wp-content/uploads/2010/11/101-300x185.jpg" alt="Figure 10 - Creating New Host" width="300" height="185" /></a><p class="wp-caption-text">Figure 10 - Creating New Host</p></div>
<p>You can view the host record successfully created message (see Figure 11)</p>
<div id="attachment_876" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/111.jpg" rel="lightbox[865]"><img class="size-medium wp-image-876" title="Figure 11 - Host Record Successfully Created" src="http://www.fivenumber.com/wp-content/uploads/2010/11/111-300x185.jpg" alt="Figure 11 - Host Record Successfully Created" width="300" height="185" /></a><p class="wp-caption-text">Figure 11 - Host Record Successfully Created</p></div>
<p>Now we have to create a new alias under the new zone, to do that select  the newly created created zone, in the DNS manager, then right click and  click on <strong>New Alias (CNAME)</strong> to create the alias name (see Figure 12)</p>
<p><strong>For your information</strong>: Canonical Name in short called as <strong>CNAME </strong>that indicates the true host name of a computer that it&#8217;s aliases are linked with</p>
<div id="attachment_877" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/121.jpg" rel="lightbox[865]"><img class="size-medium wp-image-877" title="Figure 12 - Creating New Alias Name (CNAME)" src="http://www.fivenumber.com/wp-content/uploads/2010/11/121-300x190.jpg" alt="Figure 12 - Creating New Alias Name (CNAME)" width="300" height="190" /></a><p class="wp-caption-text">Figure 12 - Creating New Alias Name (CNAME)</p></div>
<p>In the <strong>New Resource Record</strong> dialog box provide <strong>Alias name</strong> as <strong>www2</strong>, then click on <strong>Browse </strong>and select the newly created host file <strong>www</strong> located under <strong>Forward Lookup Zones</strong> &gt; <strong><em>&lt;Newly created zone name</em></strong>&gt; (see Figure 13)</p>
<div id="attachment_878" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/131.jpg" rel="lightbox[865]"><img class="size-medium wp-image-878" title="Figure 13 - Creating Alias Name (CNAME)" src="http://www.fivenumber.com/wp-content/uploads/2010/11/131-300x287.jpg" alt="Figure 13 - Creating Alias Name (CNAME)" width="300" height="287" /></a><p class="wp-caption-text">Figure 13 - Creating Alias Name (CNAME)</p></div>
<p>After selecting the fully qualified name, click <strong>OK</strong> (see Figure 14)</p>
<div id="attachment_879" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/141.jpg" rel="lightbox[865]"><img class="size-medium wp-image-879" title="Figure 14 - Creating New Alias Name (CNAME)" src="http://www.fivenumber.com/wp-content/uploads/2010/11/141-300x224.jpg" alt="Figure 14 - Creating New Alias Name (CNAME)" width="300" height="224" /></a><p class="wp-caption-text">Figure 14 - Creating New Alias Name (CNAME)</p></div>
<p>We are done almost, now try to execute the NSLOOKUP command to verify the IP address of the site and ping the site to view the reply ping back (see Figure 15 and 16)</p>
<div id="attachment_880" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/151.jpg" rel="lightbox[865]"><img class="size-medium wp-image-880" title="Figure 15 - Executing NSLOOKUP command to verify the IP address of the site" src="http://www.fivenumber.com/wp-content/uploads/2010/11/151-300x169.jpg" alt="Figure 15 - Executing NSLOOKUP command to verify the IP address of the site" width="300" height="169" /></a><p class="wp-caption-text">Figure 15 - Executing NSLOOKUP command to verify the IP address of the site</p></div>
<div id="attachment_881" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/161.jpg" rel="lightbox[865]"><img class="size-medium wp-image-881" title="Figure 16 - Pinging the Site to view the reply ping back" src="http://www.fivenumber.com/wp-content/uploads/2010/11/161-300x147.jpg" alt="Figure 16 - Pinging the Site to view the reply ping back" width="300" height="147" /></a><p class="wp-caption-text">Figure 16 - Pinging the Site to view the reply ping back</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/single-zone-split-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting an Excel SpreadSheet to SharePoint 2010 list</title>
		<link>http://www.fivenumber.com/connecting-an-excel-spreadsheet-to-sharepoint-2010-list/</link>
		<comments>http://www.fivenumber.com/connecting-an-excel-spreadsheet-to-sharepoint-2010-list/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 06:55:24 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[Sharepoint 2010]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=844</guid>
		<description><![CDATA[Sharepoint 2010 has a feature of connecting an Excel workbook Whenever an item is added/updated/deleted in SharPoint list the record is also added/updated/deleted in the connected Excel workbook In this example we will see how to connect an Excel workbook to SharePoint list Initially I have created a simple SharePoint custom list with few records [...]]]></description>
			<content:encoded><![CDATA[<p>Sharepoint 2010 has a feature of connecting an Excel workbook<br />
Whenever an item is added/updated/deleted in SharPoint list the record is also added/updated/deleted in the connected Excel workbook<br />
In this example we will see how to connect an Excel workbook to SharePoint list</p>
<p>Initially I have created a simple SharePoint custom list with few records in that, the list contains four columns <strong>Title</strong> (default column), <strong>Employee Name</strong> (single line text), <strong>Designation </strong>(choice filed), <strong>Department </strong>(choice field)<br />
(See in<strong> </strong>Figure 1)</p>
<div id="attachment_845" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/1.jpg" rel="lightbox[844]"><img class="size-medium wp-image-845" title="Figure 1 - Simple SharePoint Custom List" src="http://www.fivenumber.com/wp-content/uploads/2010/11/1-300x77.jpg" alt="Figure 1 - Simple SharePoint Custom List" width="300" height="77" /></a><p class="wp-caption-text">Figure 1 - Simple SharePoint Custom List</p></div>
<p>Now, we are ready to connect, click on <strong>List</strong> then click <strong>Export to Excel</strong> option (see Figure 2)</p>
<div id="attachment_846" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/2.jpg" rel="lightbox[844]"><img class="size-medium wp-image-846" title="Figure 2 - Click on Export to Excel" src="http://www.fivenumber.com/wp-content/uploads/2010/11/2-300x130.jpg" alt="Figure 2 - Click on Export to Excel" width="300" height="130" /></a><p class="wp-caption-text">Figure 2 - Click on Export to Excel</p></div>
<p>A file download window pops, click on <strong>Save</strong> (see Figure 3)</p>
<div id="attachment_847" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/3.jpg" rel="lightbox[844]"><img class="size-medium wp-image-847" title="Figure 3 - File Download Window, Click Save" src="http://www.fivenumber.com/wp-content/uploads/2010/11/3-300x144.jpg" alt="Figure 3 - File Download Window, Click Save" width="300" height="144" /></a><p class="wp-caption-text">Figure 3 - File Download Window, Click Save</p></div>
<p>Save the file in some location (in this example I have saved in E:\Employee location) (see Figure 4)</p>
<div id="attachment_848" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/4.jpg" rel="lightbox[844]"><img class="size-medium wp-image-848" title="Figure 4 - Saving Excel Web Query File" src="http://www.fivenumber.com/wp-content/uploads/2010/11/4-300x201.jpg" alt="Figure 4 - Saving Excel Web Query File" width="300" height="201" /></a><p class="wp-caption-text">Figure 4 - Saving Excel Web Query File</p></div>
<p>Then open the saved<strong> Excel Web Query</strong> file from the location where you saved or click on the<strong> Open</strong> button in download dialog window (see Figure 5)</p>
<div id="attachment_849" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/51.jpg" rel="lightbox[844]"><img class="size-medium wp-image-849" title="Figure 5 - Open the downloaded file" src="http://www.fivenumber.com/wp-content/uploads/2010/11/51-300x229.jpg" alt="Figure 5 - Open the downloaded file" width="300" height="229" /></a><p class="wp-caption-text">Figure 5 - Open the downloaded file</p></div>
<p>While the <strong>Excel Web Query File</strong> is opening you can view the <strong>Microsoft Excel Security Notice</strong> (the dialog window says warning about the data connection) click on <strong>Enable </strong>(see Figure 6)</p>
<div id="attachment_850" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/6.jpg" rel="lightbox[844]"><img class="size-medium wp-image-850" title="Figure 6 - Enable Data Connections" src="http://www.fivenumber.com/wp-content/uploads/2010/11/6-300x207.jpg" alt="Figure 6 - Enable Data Connections" width="300" height="207" /></a><p class="wp-caption-text">Figure 6 - Enable Data Connections</p></div>
<p>As soon as you click on <strong>Enable </strong>button you can view the SharePoint list data in the<strong> Excel Web Query File</strong> (see Figure 7)</p>
<div id="attachment_851" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/7.jpg" rel="lightbox[844]"><img class="size-medium wp-image-851" title="Figure 7 - Excel Web Query File, Shows SharePoint List Data" src="http://www.fivenumber.com/wp-content/uploads/2010/11/7-300x162.jpg" alt="Figure 7 - Excel Web Query File, Shows SharePoint List Data" width="300" height="162" /></a><p class="wp-caption-text">Figure 7 - Excel Web Query File, Shows SharePoint List Data</p></div>
<p>Now we have to set the data connection to this workbook, to do that select<strong> Data</strong> menu and click on <strong>Connections </strong>(see Figure 8 )</p>
<div id="attachment_852" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/8.jpg" rel="lightbox[844]"><img class="size-medium wp-image-852" title="Figure 8 - Data Connections for the workbook" src="http://www.fivenumber.com/wp-content/uploads/2010/11/8-300x153.jpg" alt="Figure 8 - Data Connections for the workbook" width="300" height="153" /></a><p class="wp-caption-text">Figure 8 - Data Connections for the workbook</p></div>
<p>A <strong>Workbook Connections</strong> window opens, select the workbook name and click on <strong>Properties </strong>(see Figure 9)</p>
<div id="attachment_853" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/9.jpg" rel="lightbox[844]"><img class="size-medium wp-image-853" title="Figure 9 - Workbook Connections" src="http://www.fivenumber.com/wp-content/uploads/2010/11/9-300x213.jpg" alt="Figure 9 - Workbook Connections" width="300" height="213" /></a><p class="wp-caption-text">Figure 9 - Workbook Connections</p></div>
<p>Then in <strong>Connection Properties</strong> dialog box select <strong>Enable background refresh </strong>and <strong>Refresh data when opening the file</strong>, then click <strong>OK </strong>(see Figure 10)</p>
<div id="attachment_854" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/10.jpg" rel="lightbox[844]"><img class="size-medium wp-image-854" title="Figure 10 - Settings the Connection Properties" src="http://www.fivenumber.com/wp-content/uploads/2010/11/10-300x223.jpg" alt="Figure 10 - Settings the Connection Properties" width="300" height="223" /></a><p class="wp-caption-text">Figure 10 - Settings the Connection Properties</p></div>
<p>Now we have to save the Excel file in a trusted location, so before saving the Excel file first we have to specify a trusted location, to do that Select <strong>File </strong>menu and click on <strong>Options </strong>(see Figure 11)</p>
<div id="attachment_855" class="wp-caption aligncenter" style="width: 290px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/11.jpg" rel="lightbox[844]"><img class="size-medium wp-image-855" title="Figure 11 - Specifying Trusted Location" src="http://www.fivenumber.com/wp-content/uploads/2010/11/11-280x300.jpg" alt="Figure 11 - Specifying Trusted Location" width="280" height="300" /></a><p class="wp-caption-text">Figure 11 - Specifying Trusted Location</p></div>
<p>In<strong> Excel Options</strong> window select<strong> Trust Center</strong> and click on <strong>Trust Center Settings</strong> (see Figure 12)</p>
<div id="attachment_856" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/12.jpg" rel="lightbox[844]"><img class="size-medium wp-image-856" title="Figure 12 - Specifying Trusted Location" src="http://www.fivenumber.com/wp-content/uploads/2010/11/12-300x242.jpg" alt="Figure 12 - Specifying Trusted Location" width="300" height="242" /></a><p class="wp-caption-text">Figure 12 - Specifying Trusted Location</p></div>
<p>In <strong>Trust Center</strong> dialog window select <strong>Trusted Locations</strong> and click on <strong>Add new locations</strong>, specify a path for trusted source, then click  <strong>OK </strong>(see Figure 13)</p>
<div id="attachment_857" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/13.jpg" rel="lightbox[844]"><img class="size-medium wp-image-857" title="Figure 13 - Spedifying Trusted Location" src="http://www.fivenumber.com/wp-content/uploads/2010/11/13-300x241.jpg" alt="Figure 13 - Specifying Trusted Location" width="300" height="241" /></a><p class="wp-caption-text">Figure 13 - Specifying Trusted Location</p></div>
<p>Click <strong>OK </strong>on <strong>Trust Center</strong> window, click <strong>OK </strong>on <strong>Excel Options</strong> window, then save the Excel workbook in some location, in this example I&#8217;m saving the Excel file in the same location (E:\Employees) where Excel Web Query File was saved</p>
<p>Now I will try to add the new Item in the SharePoint list, so we will see whether item is added in the Excel spread sheet (see Figure 14)</p>
<div id="attachment_858" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/14.jpg" rel="lightbox[844]"><img class="size-medium wp-image-858" title="Figure 14 - Adding Item in Sharepoint List" src="http://www.fivenumber.com/wp-content/uploads/2010/11/14-300x203.jpg" alt="Figure 14 - Adding Item in Sharepoint List" width="300" height="203" /></a><p class="wp-caption-text">Figure 14 - Adding Item in Sharepoint List</p></div>
<p>Now I can see the newly item added SharePoint list is also updated in the Excel workbook (see Figure 14)</p>
<div id="attachment_859" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/15.jpg" rel="lightbox[844]"><img class="size-medium wp-image-859" title="Figure 15 - Item Updated in the Connected Excel Workbook" src="http://www.fivenumber.com/wp-content/uploads/2010/11/15-300x185.jpg" alt="Figure 15 - Item Updated in the Connected Excel Workbook" width="300" height="185" /></a><p class="wp-caption-text">Figure 15 - Item Updated in the Connected Excel Workbook</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/connecting-an-excel-spreadsheet-to-sharepoint-2010-list/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Configure SharePoint 2010 Metadata Navigation and Filter</title>
		<link>http://www.fivenumber.com/configure-sharepoint-2010-metadata-navigation-and-filter/</link>
		<comments>http://www.fivenumber.com/configure-sharepoint-2010-metadata-navigation-and-filter/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 03:58:03 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[Sharepoint 2010 - General]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=835</guid>
		<description><![CDATA[We have to discuss about the most thrilling and useful feature for the document library today. Yes I’m talking about Metadata Navigation Settings in SharePoint 2010 document library. SharePoint 2010 Metadata Navigation is the new piece of feature that supports to navigate and filter the documents in a library by means of metadata. It is [...]]]></description>
			<content:encoded><![CDATA[<p>We have to discuss about the most thrilling and useful feature for the document library today.</p>
<p>Yes I’m talking about <strong>Metadata Navigation Settings</strong> in SharePoint 2010 document library.</p>
<p>SharePoint 2010 Metadata Navigation is the new piece of feature that supports to navigate and filter the documents in a library by means of metadata.</p>
<p>It is one of the most significant feature to navigate through the documents.</p>
<p>If we wants to navigate through the documents by metadata, first we have to configure the Metadata Navigation Settings</p>
<p>In this article I would like to show how to navigate and filter the documents by content types and columns</p>
<p>First of all I have enabled the document library to support the content types, please follow the article <a title="Document templates by using site content types in MOSS" href="http://www.fivenumber.com/document-template-by-using-site-content-type-in-moss/" target="_blank">Document templates by using site content types in MOSS</a></p>
<p>However enabling site content types in SharePoint 2010 is similar to MOSS</p>
<p>So now I&#8217;m ready with the document library which contains few documents and content types like Word/Excel/Power Point documents etc.</p>
<p>I can create/upload documents using the above content types, so I have uploaded few documents (Word, Excel, PowerPoint etc) to my library can view in Figure 1</p>
<div id="attachment_837" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/11.png" rel="lightbox[835]"><img class="size-medium wp-image-837" title="Figure 1 - SharePoint 2010 Document Library With Different Types of Document" src="http://www.fivenumber.com/wp-content/uploads/2010/11/11-300x116.png" alt="Figure 1 - SharePoint 2010 Document Library With Different Types of Document" width="300" height="116" /></a><p class="wp-caption-text">Figure 1 -SharePoint 2010 Document Library With Different Types of Document</p></div>
<p>Then, go to SharePoint 2010 <strong>document library &gt; library settings</strong></p>
<ul>
<li>Under <strong>General Settings</strong> section click on <strong>Metadata navigation settings</strong></li>
<li><strong> </strong>Select fields from avaliable hirerarchy fields and add for configuring navigation</li>
<li>Then, select available key filter fields and add for configuring filters</li>
<li>Then, click on <strong>OK</strong> button (please follow Figure 2)</li>
</ul>
<div id="attachment_840" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/31.png" rel="lightbox[835]"><img class="size-medium wp-image-840" title="Figure 2 - Configuring Metadata Navigation and Filter Settings" src="http://www.fivenumber.com/wp-content/uploads/2010/11/31-300x167.png" alt="Figure 2 - Configuring Metadata Navigation and Filter Settings" width="300" height="167" /></a><p class="wp-caption-text">Figure 2 - Configuring Metadata Navigation and Filter Settings</p></div>
<p>Now, you are also most done, navigate the document library you can view the newly added section which shows the navigation hirerarchy and filtering options (see Figure 3)</p>
<div id="attachment_841" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/11/5.jpg" rel="lightbox[835]"><img class="size-medium wp-image-841" title="Figure 3 - Navigation and Filtering Through Metadata" src="http://www.fivenumber.com/wp-content/uploads/2010/11/5-300x167.jpg" alt="Figure 3 - Navigation and Filtering Through Metadata" width="300" height="167" /></a><p class="wp-caption-text">Figure 3 - Navigation and Filtering Through Metadata</p></div>
<p>It allows filtering the document library documents by means of content types, columns.</p>
<p>After configure Metadata navigation, I can navigate through the document very easily by selecting the appropriate content type.<br />
I can also filter the document library to show only one group of document types like word/excel/powerpoint/publisher/infopath document type.<br />
It is possible to filter through column like….If I want to show only documents which belongs to HR/IT/Admin/Finance/Security department.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/configure-sharepoint-2010-metadata-navigation-and-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Most Common Custom WebParts Part 2 – Menu WebPart Shows Sites and Sub-Sites in Fly-Out Mode</title>
		<link>http://www.fivenumber.com/most-common-custom-webparts-part-2-%e2%80%93-menu-webpart-shows-sites-and-sub-sites-in-fly-out-mode/</link>
		<comments>http://www.fivenumber.com/most-common-custom-webparts-part-2-%e2%80%93-menu-webpart-shows-sites-and-sub-sites-in-fly-out-mode/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 05:12:49 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>
		<category><![CDATA[SharePoint 2010 - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[object model]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=832</guid>
		<description><![CDATA[In my previous post can view the most common custom webparts part 1 From last post I want to continue the series of most commonly used custom webparts, so once again I come up with a simple and small custom menu webpart shows all the sites and sub-sites of a SharePoint site in fly-out style]]></description>
			<content:encoded><![CDATA[<p>In my previous post can view the <a title="Most common custom webparts part 1" href="http://www.fivenumber.com/most-common-custom-webparts-part1-tree-view-webpart-shows-sites-and-sub-sites/" target="_blank">most common custom webparts part 1</a></p>
<p>From last post I want to continue the series of most commonly used custom webparts, so once again I come up with a simple and small custom menu webpart shows all the sites and sub-sites of a SharePoint site in fly-out style</p>
<div id="attachment_833" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/10/11.png" rel="lightbox[832]"><img class="size-medium wp-image-833" title="SharePoint Menu WebPart in fly-Out Style" src="http://www.fivenumber.com/wp-content/uploads/2010/10/11-300x225.png" alt="SharePoint Menu WebPart in fly-Out Style" width="300" height="225" /></a><p class="wp-caption-text">SharePoint Menu WebPart in fly-Out Style</p></div>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.ComponentModel;
using System.Web;
using System.Drawing;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace CustomWebParts.VisualWebPart1
{
    [ToolboxItemAttribute(false)]
    public class VisualWebPart1 : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
       // private const string _ascxPath = @&quot;~/_CONTROLTEMPLATES/CustomWebParts/TreeView/TreeViewUserControl.ascx&quot;;

        System.Web.UI.WebControls.Menu menu = null;

        protected override void CreateChildControls()
        {
            //Control control = Page.LoadControl(_ascxPath);
            //Controls.Add(control);

            menu = new System.Web.UI.WebControls.Menu();
            SPSite site = SPContext.Current.Site;
            SPWeb web = SPContext.Current.Web;

            menu.StaticDisplayLevels = 1;
            menu.MaximumDynamicDisplayLevels = 200;
            menu.Orientation = System.Web.UI.WebControls.Orientation.Horizontal;
            menu.StaticEnableDefaultPopOutImage = false;
            menu.StaticPopOutImageUrl = &quot;/_layouts/images/menudark.gif&quot;;
            menu.SkipLinkText = &quot;&quot;;
            menu.DynamicHoverStyle.BackColor = System.Drawing.Color.FromName(&quot;#CBE3F0&quot;);
            menu.CssClass = &quot;ms-topNavContainer&quot;;

            menu.StaticMenuItemStyle.ItemSpacing = Unit.Pixel(0);
            menu.StaticSelectedStyle.CssClass = &quot;ms-topnavselected&quot;;
            menu.StaticHoverStyle.CssClass = &quot;ms-topNavHover&quot;;

            menu.DynamicMenuStyle.BackColor = System.Drawing.Color.FromName(&quot;#F2F3F4&quot;);
            menu.DynamicMenuStyle.BorderColor = System.Drawing.Color.FromName(&quot;#A7B4CE&quot;);
            menu.DynamicMenuStyle.BorderWidth = Unit.Pixel(1);

            menu.DynamicMenuItemStyle.CssClass = &quot;ms-topNavFlyOuts&quot;;
            menu.DynamicHoverStyle.CssClass = &quot;ms-topNavFlyOutsHover&quot;;
            menu.DynamicSelectedStyle.CssClass = &quot;ms-topNavFlyOutsSelected&quot;;

            MenuItemStyle stMenuStyle = menu.StaticMenuItemStyle;
            stMenuStyle.CssClass = &quot;ms-topnav&quot;;

            stMenuStyle.HorizontalPadding = 0;
            stMenuStyle.VerticalPadding = 0;
            stMenuStyle.ItemSpacing = Unit.Pixel(0);

            MenuItemStyle dyMenuStyle = menu.DynamicMenuItemStyle;
            dyMenuStyle.CssClass = &quot;ms-topNavFlyOuts&quot;;
            dyMenuStyle.HorizontalPadding = 0;
            dyMenuStyle.VerticalPadding = 0;

            System.Web.UI.WebControls.MenuItem mItem = new System.Web.UI.WebControls.MenuItem(web.Title);
            mItem.NavigateUrl = web.Site.Url;
            menu.Items.Add(mItem);

            GenerateMenu(menu, Context);
            menu.DataBind();
            this.Controls.Add(menu);
        }

        public static void GenerateMenu(System.Web.UI.WebControls.Menu menu, HttpContext context)
        {
            SPSite site = SPContext.Current.Site;
            SPWeb web = SPContext.Current.Web;

            foreach (SPWeb subsite in web.Webs)
            {
                System.Web.UI.WebControls.MenuItem mItem = new System.Web.UI.WebControls.MenuItem();
                mItem.NavigateUrl = subsite.Url;
                mItem.Text = subsite.Title;
                mItem.ToolTip = subsite.Title;
                menu.Items.Add(mItem);
                BuildMenu(subsite, mItem, context);
            }
        }

        private static void BuildMenu(SPWeb subweb, System.Web.UI.WebControls.MenuItem mItem, HttpContext context)
        {
            SPSite site = SPContext.Current.Site;
            SPWeb web = SPContext.Current.Web;

            foreach (SPWeb subsite in subweb.Webs)
            {
                System.Web.UI.WebControls.MenuItem mSubItem = new System.Web.UI.WebControls.MenuItem();
                mSubItem.NavigateUrl = subsite.Url;
                mSubItem.Text = subsite.Title;
                mSubItem.ToolTip = subsite.Title;
                mItem.ChildItems.Add(mSubItem);
            }
        }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/most-common-custom-webparts-part-2-%e2%80%93-menu-webpart-shows-sites-and-sub-sites-in-fly-out-mode/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Most Common Custom WebParts Part 1 &#8211; Tree View WebPart Shows Sites and Sub-Sites</title>
		<link>http://www.fivenumber.com/most-common-custom-webparts-part1-tree-view-webpart-shows-sites-and-sub-sites/</link>
		<comments>http://www.fivenumber.com/most-common-custom-webparts-part1-tree-view-webpart-shows-sites-and-sub-sites/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 04:26:07 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[MOSS - Object Model]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>
		<category><![CDATA[SharePoint 2010 - Object Model]]></category>
		<category><![CDATA[Custom Webparts]]></category>
		<category><![CDATA[object model]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=825</guid>
		<description><![CDATA[I desired to support most common custom webparts used by the SharePoint professional, so that these can be helpful for them. A custom tree view webpart shows all the sites and sub-sites of a SharePoint site Please use the below code and to get the exact look as show in the aboave image, the tree [...]]]></description>
			<content:encoded><![CDATA[<p>I desired to support most common custom webparts used by the SharePoint professional, so that these can be helpful for them.<br />
A custom tree view webpart shows all the sites and sub-sites of a SharePoint site</p>
<div id="attachment_826" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.fivenumber.com/wp-content/uploads/2010/10/1.png" rel="lightbox[825]"><img class="size-medium wp-image-826" title="SharePoint Custom Tree View WebPart" src="http://www.fivenumber.com/wp-content/uploads/2010/10/1-300x243.png" alt="SharePoint Custom Tree View WebPart" width="300" height="243" /></a><p class="wp-caption-text">SharePoint Custom Tree View WebPart</p></div>
<p>Please use the below code and to get the exact look as show in the aboave image, the tree view webpart can expand/collapse</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace CustomWebParts.CustomTreeView
{
    [ToolboxItemAttribute(false)]
    public class CustomTreeView : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        //private const string _ascxPath = @&quot;~/_CONTROLTEMPLATES/CustomWebParts/CustomTreeView/CustomTreeViewUserControl.ascx&quot;;

        TreeView myTree;
        LinkButton lnkBtnExpand;
        LinkButton lnkBtnCollapse;
        Label lblPipeDivider;
        Label lbl_ErrorMsg;
        private string errorMessage = string.Empty;
        private int level = 0;

        protected override void CreateChildControls()
        {
            //Control control = Page.LoadControl(_ascxPath);
            //Controls.Add(control);

            this.Controls.Clear();
            myTree = new TreeView();
            myTree.ExpandImageUrl = &quot;/_layouts/images/tvplus.gif&quot;;
            myTree.RootNodeStyle.ImageUrl = &quot;/_layouts/images/stsicon.gif&quot;;
            myTree.ParentNodeStyle.ImageUrl = &quot;/_layouts/images/stsicon.gif&quot;;
            myTree.LeafNodeStyle.ImageUrl = &quot;/_layouts/images/stsicon.gif&quot;;
            myTree.CollapseImageUrl = &quot;/_layouts/images/tvminus.gif&quot;;
            myTree.NoExpandImageUrl = &quot;/_layouts/images/stsicon.gif&quot;;            

            myTree.NodeWrap = true;
            myTree.ShowLines = true;
            myTree.ShowExpandCollapse = true;
            myTree.EnableClientScript = true;

            GenerateTreeView();
            myTree.CollapseAll();
            myTree.CssClass = &quot;ms-navitem a&quot;;
            this.Controls.Add(myTree);

            lnkBtnExpand = new LinkButton();
            lnkBtnExpand.Click += new EventHandler(expandAll_Click);
            lnkBtnExpand.Text = &quot;Expand all&quot;;
            lnkBtnExpand.CssClass = &quot;ms-navitem a&quot;;
            this.Controls.Add(lnkBtnExpand);

            lblPipeDivider = new Label();
            lblPipeDivider.Text = &quot;  |  &quot;;
            this.Controls.Add(lblPipeDivider);

            lnkBtnCollapse = new LinkButton();
            lnkBtnCollapse.Click += new EventHandler(collapseAll_Click);
            lnkBtnCollapse.Text = &quot;Collapse all&quot;;
            lnkBtnCollapse.CssClass = &quot;ms-navitem a&quot;;
            this.Controls.Add(lnkBtnCollapse);

            lbl_ErrorMsg = new Label();
            this.Controls.Add(lbl_ErrorMsg);

            base.CreateChildControls();
        }

        private void GenerateTreeView()
        {
            SPSite mySite = null;
            SPWeb myWeb = SPContext.Current.Web;
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                try
                {
                    mySite = new SPSite(myWeb.Site.ID);
                    using (mySite)
                    {
                        level = 1;
                        foreach (SPWeb subWeb in myWeb.Webs)
                        {
                            TreeNode myTreeNode = new TreeNode(subWeb.Title);
                            myTreeNode.NavigateUrl = subWeb.Url;
                            ReadSubSites(subWeb, ref myTreeNode);
                            myTree.Nodes.Add(myTreeNode);
                        }

                    }
                }
                catch (Exception ex)
                {
                    errorMessage = ex.ToString();
                }
            });
        }

        private void ReadSubSites(SPWeb subWeb, ref TreeNode myTreeNode)
        {
            try
            {
                foreach (SPWeb myChildSubWeb in subWeb.Webs)
                {
                    TreeNode subnode = new TreeNode(myChildSubWeb.Title);
                    subnode.NavigateUrl = myChildSubWeb.Url;

                    myTreeNode.ChildNodes.Add(subnode);

                    if (myChildSubWeb.Webs.Count &gt; 0)
                    {
                        if (myTreeNode.ChildNodes.Count &gt; 0)
                        {
                            level = level + 1;
                            TreeNode myChildNode = myTreeNode.ChildNodes[myTreeNode.ChildNodes.Count - 1];
                            ReadSubSites(myChildSubWeb, ref myChildNode);
                            level = level - 1;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                errorMessage = ex.ToString();
            }
        }

        void expandAll_Click(object sender, EventArgs e)
        {
            myTree.ExpandAll();
        }

        void collapseAll_Click(object sender, EventArgs e)
        {
            myTree.CollapseAll();
        }      

        protected override void RenderContents(HtmlTextWriter writer)
        {
            EnsureChildControls();
            lnkBtnExpand.RenderControl(writer);
            lblPipeDivider.RenderControl(writer);
            lnkBtnCollapse.RenderControl(writer);
            RenderChildren(writer);
        }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/most-common-custom-webparts-part1-tree-view-webpart-shows-sites-and-sub-sites/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Seminar &#8211; Getting Started with SharePoint in Hyderabad</title>
		<link>http://www.fivenumber.com/seminar-getting-started-with-sharepoint-in-hyderabad/</link>
		<comments>http://www.fivenumber.com/seminar-getting-started-with-sharepoint-in-hyderabad/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 12:54:07 +0000</pubDate>
		<dc:creator>G Vijai Kumar</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Sharepoint 2010 - General]]></category>
		<category><![CDATA[seminar]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Sharepoint 2010]]></category>

		<guid isPermaLink="false">http://www.fivenumber.com/?p=821</guid>
		<description><![CDATA[We will be happy to announce that we are starting introductory session on SharePoint in Hyderabad, India on Sunday September 19th 2010 at 11:00 a.m. If you or your friends interested to join please let us know through the contact form The seminar will be on topics of why SharePoint, where SharePoint and how SharePoint [...]]]></description>
			<content:encoded><![CDATA[<p>We will be happy to announce that we are starting introductory session on SharePoint in Hyderabad, India on Sunday September 19th 2010 at 11:00 a.m. If you or your friends interested to join please let us know through the <a title="Contact for seminar on SharePoint" href="http://www.fivenumber.com/contact/" target="_blank">contact form</a><br />
The seminar will be on topics of why SharePoint, where SharePoint and how SharePoint<br />
Please forward this in the community, thank you.</p>
<p>Venu:</p>
<p># 17, IInd Floor,<br />
Above Cafe Coffee Day,<br />
Beside ICICI Bank,<br />
Vanasthali Puram,<br />
Hyderabad.500070</p>
<p>Mobile: +91-9987491026 (or) 91-9030043050</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fivenumber.com/seminar-getting-started-with-sharepoint-in-hyderabad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

