Saturday, December 31, 2011
Remembering my memories of 2011
Just 5 hours to go, for a beautiful New Year with new thoughts and new ideas, And I am remembering my beautiful 2011 by watching the football match between MAT UTD Vs BLACKB'N. It was a more a Happy year than a sad year.
Personal Life:
First I will start with my personal life, This year I got married to Asima and started the most challenging part of life. And also enjoying staying together the whole family. Got to know some responsibility towards a family and towards a girl. Happy to be a Son-In-Law, a different feelings.
Professional Life:
Got a very good job and a very good team to work on, which is also a part of my aim (to work
Personal Life:
First I will start with my personal life, This year I got married to Asima and started the most challenging part of life. And also enjoying staying together the whole family. Got to know some responsibility towards a family and towards a girl. Happy to be a Son-In-Law, a different feelings.
Professional Life:
Got a very good job and a very good team to work on, which is also a part of my aim (to work
Thursday, December 29, 2011
Google Adsense alternatives
First of all I will recommend you to go for Google Adsense if you have a active Adsense account. If you are banned from Google adsense then you can try out from the following google adsense alternatives. You can also check some blogger articles here.
Here are some best google adsense alternatives.
AdBrite:
AdBrite is one of the best adsense alternatives.
They have different ad formats like Full Page Ad, CPM Banners, CPC Banners, CPC Text - Banners (Content Ads), CPC Text - Inline (Key Word Contextual Targeting), Video In-Banner, Video Pre-Roll etc.
It pays with minimum $20.
Also you can run AdBrite ads with Google Adsense.
Here are some best google adsense alternatives.
AdBrite:
AdBrite is one of the best adsense alternatives.
They have different ad formats like Full Page Ad, CPM Banners, CPC Banners, CPC Text - Banners (Content Ads), CPC Text - Inline (Key Word Contextual Targeting), Video In-Banner, Video Pre-Roll etc.
It pays with minimum $20.
Also you can run AdBrite ads with Google Adsense.
Monday, December 26, 2011
List Throttling in SharePoint 2010
List Throttling is the new concepts introduced in SharePoint 2010 to set the limits on the rows of data can be retrieved from a SharePoint list or document library at one time. Suppose a SharePoint lists contains two thousand records and someone trying to retrieve all items, then List throttling will not allow to do so.
Throttling setting will be apply for both views created by the user also for queries executed in custom code also. When executing queries, the number of results returned will be determined by the throttle settings for the given list and the rights of the current user.
Throttling setting will be apply for both views created by the user also for queries executed in custom code also. When executing queries, the number of results returned will be determined by the throttle settings for the given list and the rights of the current user.
Saturday, December 24, 2011
Thursday, December 22, 2011
Why use Visual Studio in SharePoint?
If you can do things using SharePoint designer or by using browser then why should we use Visual studio?
Also you can check out some posts on:
- Deploy custom images to SharePoint 2010
- Hide ribbon in sharepoint 2010
- Content databases are growing too large in SharePoint 2013
By using Visual studio you can do very powerful things like:
You can use different built in templates available in Visual Studio 2010 to develop SharePoint things like visual web part, site definition, content types etc. Visual Studio 2010 has more templates that Visual Studio 2008.
Also it has F5 feature to build, deploy and debug like normal asp.net application.
- You can edit and debug things in your development machine which is not possible using SharePoint designer.
- You can write code using C#.net or VB.Net.
- Visual studio creates the wsp packages which are easy to deploy and also can be reused. Also you can use it in different server farm etc.
- Also you can put everything in the source control like VSS or SVN and can check-in and check-out and do work simultaneously.
- You also can have a build server if you have a very big project.
- Also one more major thing you can do: you can do code analysis, which you can not do in SharePoint designer.
- Also by using Visual Studio 2010 you can develop Sandboxed solution. Which allowed us to deploy code, even allows to upload the wsp to the solution store of the current web site without affecting other site collection on you SharePoint site.
- This is very much helpful in hosted environments.
- Visual Studio also provides Mapped Folder concept, so that everything will be placed in the proper location in the 14 hive folder.
Also you can check out some posts on:
- Deploy custom images to SharePoint 2010
- Hide ribbon in sharepoint 2010
- Content databases are growing too large in SharePoint 2013
By using Visual studio you can do very powerful things like:
You can use different built in templates available in Visual Studio 2010 to develop SharePoint things like visual web part, site definition, content types etc. Visual Studio 2010 has more templates that Visual Studio 2008.
Also it has F5 feature to build, deploy and debug like normal asp.net application.
- You can edit and debug things in your development machine which is not possible using SharePoint designer.
- You can write code using C#.net or VB.Net.
- Visual studio creates the wsp packages which are easy to deploy and also can be reused. Also you can use it in different server farm etc.
- Also you can put everything in the source control like VSS or SVN and can check-in and check-out and do work simultaneously.
- You also can have a build server if you have a very big project.
- Also one more major thing you can do: you can do code analysis, which you can not do in SharePoint designer.
- Also by using Visual Studio 2010 you can develop Sandboxed solution. Which allowed us to deploy code, even allows to upload the wsp to the solution store of the current web site without affecting other site collection on you SharePoint site.
- This is very much helpful in hosted environments.
- Visual Studio also provides Mapped Folder concept, so that everything will be placed in the proper location in the 14 hive folder.
Tuesday, December 20, 2011
SharePoint 2010 Centered Fixed Width Design
Now a days most of the web sites comes with the centred width fixed design. Means it has center fixed and some space from left side as well as from the right hand side as shown in the figure below.
But by default SharePoint design covers the full page.
I got a solution that solved my problem as well as it has advantages that the sharepoint site will be fixed design but the ribbon will cover the full page.
So here there are few modification needed in the css file as well as in the master page.
So first go and create a .css file using SharePoint designer and the paste the below content to the css file.
But by default SharePoint design covers the full page.
I got a solution that solved my problem as well as it has advantages that the sharepoint site will be fixed design but the ribbon will cover the full page.
So here there are few modification needed in the css file as well as in the master page.
So first go and create a .css file using SharePoint designer and the paste the below content to the css file.
Saturday, December 17, 2011
AllowUnsafeUpdates in SharePoint 2010
Here we will discuss about What is AllowUnsafeUpdates in SharePoint 2010?
Also check out:
- Get all security group names using SharePoint object model
- Get icon for different file types in SharePoint 2010
- Twitter SharePoint webpart
According to msdn The AllowUnsafeUpdates property of the SPWeb class gets or sets a Boolean value that specifies whether to allow updates to the database as a result of a GET request or without requiring a security validation.
If you set it to true, then it will update values to the content database but there is a security risk.
It always took boolean values, TRUE means unsafe updates are allowed, FALSE means unsafe updates are not allowed.
If you are developing a webpage that will respond to HTTP GET requests, or a custom web form page that doesn’t inherit from the WebPartPage type and doesn’t use the Form Digest control, you will need to instruct SharePoint to skip the digest validation; otherwise, your code will not work.
For example if you want to change a list's title by using object model then you have use the
AllowUnsafeUpdates property as below.
SPWeb web = SPContext.Current.Web
SPList list = web.Lists["OurCustomList"];
try
{
web.AllowUnsafeUpdates = true;
list.Title = "My List Title Changed";
list.Update();
}
finally
{
web.AllowUnsafeUpdates = false;
}
It is always advisable to revert the AllowUnsafeUpdates value to false after executing your code.
Remember if you inherit the page from WebPartPage class then no need to use AllowUnsafeUpdates.
Also check out:
- Get all security group names using SharePoint object model
- Get icon for different file types in SharePoint 2010
- Twitter SharePoint webpart
According to msdn The AllowUnsafeUpdates property of the SPWeb class gets or sets a Boolean value that specifies whether to allow updates to the database as a result of a GET request or without requiring a security validation.
If you set it to true, then it will update values to the content database but there is a security risk.
It always took boolean values, TRUE means unsafe updates are allowed, FALSE means unsafe updates are not allowed.
If you are developing a webpage that will respond to HTTP GET requests, or a custom web form page that doesn’t inherit from the WebPartPage type and doesn’t use the Form Digest control, you will need to instruct SharePoint to skip the digest validation; otherwise, your code will not work.
For example if you want to change a list's title by using object model then you have use the
AllowUnsafeUpdates property as below.
SPWeb web = SPContext.Current.Web
SPList list = web.Lists["OurCustomList"];
try
{
web.AllowUnsafeUpdates = true;
list.Title = "My List Title Changed";
list.Update();
}
finally
{
web.AllowUnsafeUpdates = false;
}
It is always advisable to revert the AllowUnsafeUpdates value to false after executing your code.
Remember if you inherit the page from WebPartPage class then no need to use AllowUnsafeUpdates.
Thursday, December 15, 2011
Implement a breadcrumb into SharePoint 2010 website
Here we will check how can we customize SharePoint 2010 breadcrumb that are available out of box.
Also you can check out:
- Customization of quick launch with flyout in sharepoint 2010
- How to add a Survey in publishing sites in SharePoint 2010?
- Make a site collection read only in SharePoint
SharePoint 2010 breadcrumb is different from MOSS 2007 breadcrumb. If you want breadcrumb like MOSS 2007 like below:
Home -> Site1 ->Site1.1 ->Site1.1.1
Default the bread crumb comes like below image.
So to full fill our requirement, open the master page that the site is using and put the below line where you want to show. It will take care of the menu part.
Also you can follow this article for similar information.
Also you can check out:
- Customization of quick launch with flyout in sharepoint 2010
- How to add a Survey in publishing sites in SharePoint 2010?
- Make a site collection read only in SharePoint
SharePoint 2010 breadcrumb is different from MOSS 2007 breadcrumb. If you want breadcrumb like MOSS 2007 like below:
Home -> Site1 ->Site1.1 ->Site1.1.1
Default the bread crumb comes like below image.
So to full fill our requirement, open the master page that the site is using and put the below line where you want to show. It will take care of the menu part.
Also you can follow this article for similar information.
Thursday, December 8, 2011
Virender Sehwag Scored 219

Virender Sehwag scored 219 in one day international. Virender Sehwag is now the highest individual scorer in One day international. He brooked Sachin's record, who scored first one day 200* against South Africa.
This is what Sehwag told to Ravi Shastri after the 1st innings.
I never expected to score a double hundred. While opening the innings, I told Gautam Gambhir that if we can show some patience on this track, we will be in for a big one as the wicket is a good one. The outfield is fantastic and the distance of the boundary is only 50 yards.
Wednesday, December 7, 2011
SharePoint 2010 Interview Questions and Answers
Before reading this, you can check SharePoint 2010 interview question and answers
Part-1 Part 2 Part 3
Q1. What is feature activation?
This is a mechanism for adding elements to a site or site collection. The elements can be menu commands, link commands, page templates, page instances, list definitions, list instances, event handlers, and workflows.
Q2. What is the difference between feature defination and feature instance?
The feature definition is the set of source files in your Visual Studio 2010 project that gets deployed using a solution package.Once deployed, a feature definition is a set of template files
Part-1 Part 2 Part 3
Q1. What is feature activation?
This is a mechanism for adding elements to a site or site collection. The elements can be menu commands, link commands, page templates, page instances, list definitions, list instances, event handlers, and workflows.
Q2. What is the difference between feature defination and feature instance?
The feature definition is the set of source files in your Visual Studio 2010 project that gets deployed using a solution package.Once deployed, a feature definition is a set of template files
Sunday, December 4, 2011
SharePoint 2010 boundaries and limits of Microsoft SharePoint Server 2010
SharePoint 2010 supports:
300 content databases per web application
250,000 site collection per web application.
10 application pools per web server.
Size of content database can be 200GB.
In case of document archive scenario there is no limit on content database size.
There can be 60 million items including documents and list items in Content database.
300 content databases per web application
250,000 site collection per web application.
10 application pools per web server.
Size of content database can be 200GB.
In case of document archive scenario there is no limit on content database size.
There can be 60 million items including documents and list items in Content database.
Get default page layout of a publishing web site in SharePoint 2010
Here we will discuss about how to Get default page layout of a publishing web site in SharePoint 2010.
Also you can check out:
- SharePoint 2010 boundaries and limits of Microsoft SharePoint Server 2010
- Delete SharePoint List using PowerShell
- Difference between SharePoint-hosted, auto-hosted and Provider-hosted apps in SharePoint 2013
Below SharePoint 2010 object model code that is used to get the default page layout of a publishing web site in SharePoint 2010. Site URL is the site collection URL.
private static void GetDefaultPageLayout()
{
using (SPSite site = new SPSite("Site URL"))
{
using (SPWeb web = site.OpenWeb())
{
// Get the publishing web site
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web);
PageLayout pageLayout = publishingWeb.DefaultPageLayout;
Console.WriteLine("Default Page Layout Name"+pageLayout.Name + " URL of the web site : " + pageLayout.ServerRelativeUrl);
}
}
}
Also you can check out:
- SharePoint 2010 boundaries and limits of Microsoft SharePoint Server 2010
- Delete SharePoint List using PowerShell
- Difference between SharePoint-hosted, auto-hosted and Provider-hosted apps in SharePoint 2013
Below SharePoint 2010 object model code that is used to get the default page layout of a publishing web site in SharePoint 2010. Site URL is the site collection URL.
private static void GetDefaultPageLayout()
{
using (SPSite site = new SPSite("Site URL"))
{
using (SPWeb web = site.OpenWeb())
{
// Get the publishing web site
PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web);
PageLayout pageLayout = publishingWeb.DefaultPageLayout;
Console.WriteLine("Default Page Layout Name"+pageLayout.Name + " URL of the web site : " + pageLayout.ServerRelativeUrl);
}
}
}
SharePoint 2010 developer tool Microsoft Visual Studio 2010
Visual Studio 2010 offers lots of extensibility towards SharePoint 2010. It provides set of projects and item templates for SharePoint. Also it has deployment tools for packaging, releasing and upgrading. It provides templates for MOSS 2007 and SharePoint 2010.
Also you can check out some posts on:
- Get default page layout of a publishing web site in SharePoint 2010
- Copy or Move files from one folder to another folder using SharePoint 2010 object model
- SharePoint 2013 workflow architecture
Here are some project templates:
Empty SharePoint Project: This is the empty project and provides references to some useful libraries and also provides support for automatic deployment.
Visual WebPart: This is used to create Visual webpart in SharePoint 2010.
Sequential Workflow: This project template is used for developing sequential workflow.
State Machine Workflow: This project template is used for developing state machine workflow.
Business Data Connectivity Model: With this project template, you can develop custom entity models for connecting SharePoint with custom external data sources.
Event Receiver: This is a project template for adding an event receiver.
List Definition: This is a project type that is intended for deploying a new list definition.
Content Type: This template creates a project to deploy a new content type.
Module: With this project template, you can deploy content, such as images, pages, Web Parts, and so on into a SharePoint site.
Site Definition: This is a project intended for defining site defination.
Import Reusable Workflow: This project template is useful for importing workflows designed with SharePoint Designer 2010
Import SharePoint Solution Package: Imports an old or third-party solution package (WSP).
Also Visual Studio 2010 SharePoint developers tool provides a lot of item templates:
Visual Web Part: Define a custom visual web part
-->
Also you can check out some posts on:
- Get default page layout of a publishing web site in SharePoint 2010
- Copy or Move files from one folder to another folder using SharePoint 2010 object model
- SharePoint 2013 workflow architecture
Here are some project templates:
Empty SharePoint Project: This is the empty project and provides references to some useful libraries and also provides support for automatic deployment.
Visual WebPart: This is used to create Visual webpart in SharePoint 2010.
Sequential Workflow: This project template is used for developing sequential workflow.
State Machine Workflow: This project template is used for developing state machine workflow.
Business Data Connectivity Model: With this project template, you can develop custom entity models for connecting SharePoint with custom external data sources.
Event Receiver: This is a project template for adding an event receiver.
List Definition: This is a project type that is intended for deploying a new list definition.
Content Type: This template creates a project to deploy a new content type.
Module: With this project template, you can deploy content, such as images, pages, Web Parts, and so on into a SharePoint site.
Site Definition: This is a project intended for defining site defination.
Import Reusable Workflow: This project template is useful for importing workflows designed with SharePoint Designer 2010
Import SharePoint Solution Package: Imports an old or third-party solution package (WSP).
![]() |
| Visual-Studio-SharePoint-Project-Template |
Visual Web Part: Define a custom visual web part
WebPart: Define a code-only web part
Sequential Workflow: Declares a sequential workflow
State Machine: Declares a state machine workflow
Application Page: Creates a custom application webpage
Event Receiver: Defines an event receiver to handle events related to sites, lists, items, or workflows
Module: Supports deploying any kind of item (image, file, page, whatever) using a deployment package (WSP)
Content Type: Allows the definition of a new content type.
List Definition: Defines a list definition from scratch
List Instance: Creates an instance of a specific list definition.
Empty Element: Supports deploying any kind of feature using a deployment package (WSP)
User Control: Installs a custom user control that defines UI elements based on an .ascx file
![]() |
| Visual-Studio-SharePoint-Item-Template |






