27 May 2009
Interview Preparation
Click here
Special thanks : yagyashree
13 May 2009
Registing Event Handler on a list/library
- Add a Console application project in the Event Handler applcation.
- Add the DLL of Event Handler in the GAC.
- Now include the following code the console application.
<--CODE-->
static void Main(string[] args)
{
try
{
string AssembleInfo="EventHandlerRegister, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d53fad3f8a2d2037" ;
String ClassName="Akshaya.EventHandlerRegister";
RegisterEvent(http://registerSite/Sites/site, "MYCustomListName", AssembleInfo, ClassName);
Console.WriteLine("Event Registered Successfully......");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
Function for registering this Handler
<--CODE-->
private static void RegisterEvent(string SiteUrl, string ListName, string AssemblyInfo, string ClassName)
{
using (SPSite mySite = new SPSite(SiteUrl.Trim()))
{
SPWeb MyWeb = mySite.OpenWeb();
SPList MyList = MyWeb.Lists[ListName];
//include the event handler you have overrided in your handler.ex her is Itemadded
MyList.EventReceivers.Add(SPEventReceiverType.ItemAdded, AssemblyInfo, ClassName);
MyWeb.Close();
}
}
now check the list event firing and incorportating those changes.
Thanks: Akshaya
12 May 2009
Creating Sub-Site on List item added using event Handler
All that needs to be carried is create a event handler with overriding methods ItemAdded or Itemupdated.
<--Code-->
string Url = "http://Site_URL/sites/demo";
using (SPSite oSite = new SPSite(Url))
{
using (SPWeb oWeb = oSite.OpenWeb())
{
SPList projectList = oWeb.Lists["MYCustomList"];
//foreach(SPListItem listItem in projectList)
//{
string projectName =properties.ListItem["Title"].ToString();
SPWebCollection collWebsites = oWeb.Webs;
oWeb.AllowUnsafeUpdates = true;
oWeb.Navigation.TopNavigationBar.Parent.IsVisible = true;
string strWebUrl = projectName;
string siteTitle = projectName;
string siteDescription = "Sub site created by code.";
collWebsites.Add(strWebUrl, siteTitle, siteDescription, 1033, "MyTeamSitetemplate.stp", true, false);
//}
}
}
11 May 2009
Cascading Parent Child inter-relation in sharepoint
this is really a wonderful article added by Mayuresh for providing relation between 2 webparts.
http://mayureshsharepoint.blogspot.com/2009/05/cascading-with-parent-child-relation.html
Special Thanks to Mayuresh Telvekar.
29 April 2009
Sharepoint Help links
Sharepoint TODO tips
http://www.dlocc.com/sharepoint-main-menu
http://blogs.msdn.com/sridhara/
KPI in WSS 3.0
http://www.endusersharepoint.com/?p=1011
http://pathtosharepoint.wordpress.com/2008/09/01/apply-color-coding-to-your-sharepoint-lists/
Geo maps/virtual Earth
http://www.batchgeocode.com/
--
http://msdn2.microsoft.com/en-us/library/ms558975.aspx
http://www.sharepointcustomization.com/wss/articles/lists-navigation.htm
fba
http://blogs.msdn.com/joelo/archive/2006/08/22/712945.aspx
membership user
http://msdn.microsoft.com/en-us/library/kx96zecz.aspx
KPI in WSS
http://pathtosharepoint.wordpress.com/2008/09/01/apply-color-coding-to-your-sharepoint-lists/
webpart
http://blah.winsmarts.com//2006-7-Sharepoint_Webparts_AS_-_Connecting_the_WebParts_-_making_an_RSS_Reader_Application.aspx
http://www.codeproject.com/KB/sharepoint/WebParticles.aspx
Web part caching:
http://msdn2.microsoft.com/en-us/library/aa589700.aspx - Important one
http://blogs.msdn.com/ecm/archive/2006/11/08/how-to-make-your-moss-2007-web-site-faster-with-caching.aspx
http://blogs.msdn.com/modonovan/archive/2005/04/27/412505.aspx
http://msdn2.microsoft.com/en-us/library/ms964435.aspx
http://blogs.msdn.com/sharepoint/archive/2007/04/16/how-we-did-it-mission-critical-hawaiianair-com-website-powered-by-moss-2007.aspx
Associating Custom Content Types with a Custom Site Definition
http://geeksconnected.com/muhanad/Lists/Posts/Post.aspx?List=c7e6fc19%2Dbbfc%2D4349%2Db19b%2D500d67afc925&ID=14
java script
http://dotnetlibrary.blogspot.com/2006/10/javascript-faq_116069270867926884.html
Jscript debugging
http://blogs.msdn.com/webdevtools/archive/2007/03/08/jscript-debugging-in-visual-studio-2005.aspx
CSS navigation chart in MOSS 2007
http://www.heathersolomon.com/content/sp07cssreference.htm#LeftNav
Approaches to deploy user controls
http://blogs.msdn.com/davidebb/archive/2005/10/30/487160.aspx
http://www.codeproject.com/useritems/User_Control_ToCustom_One.asp
http://odetocode.com/Blogs/scott/archive/2005/10/06/2326.aspx
Using web deployment projects :
http://msdn2.microsoft.com/hi-in/asp.net/Aa336619.aspx
Usage of RunWithElevatedPrivileges with list item updates
http://www.msdner.com/dev-archive/147/328-1203-1475139.shtm
http://www.mikhaildikov.com/2007/07/runwithelevatedprivileges-watch-out-for.html
http://blogs.msdn.com/edhild/archive/2007/03/03/how-to-create-a-site-collection-in-a-workflow.aspx
Excel services with Excel 2003
http://office.microsoft.com/en-us/excel/HA100217161033.aspx?pid=CH101024611033
http://blogs.msdn.com/cumgranosalis/archive/2006/08/10/694149.aspx
Plan for design - Design Template –
http://heathersolomon.com/blog/articles/148.aspx#SPV3O12
http://technet.microsoft.com/hi-in/bb512933.aspx
http://blogs.msdn.com/andrew_may/archive/2006/06/24/SharePointBeta2WhatAreContentTypeIDs.aspx
http://www.codeproject.com/useritems/SharePointBasics.asp
http://blogs.msdn.com/bowerm/archive/2006/11/29/office-and-sharepoint-training-material.aspx
http://forums.asp.net/p/1121048/1884950.aspx- For session state problem Transactions :
http://weblogs.asp.net/paolopia/archive/2005/01/30/363312.aspx
http://blah.winsmarts.com/2006-8-Transaction_support_in_Workflow_Foundation.aspx
Office server SDK starter kit with examples:
http://www.microsoft.com/downloads/details.aspx?FamilyId=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en
Visual Studio 2005 Extensions :
http://www.microsoft.com/downloads/details.aspx?familyid=19F21E5E-B715-4F0C-B959-8C6DCBDC1057&displaylang=en
http://www.microsoft.com/downloads/details.aspx?familyid=3E1DCCCD-1CCA-433A-BB4D-97B96BF7AB63&displaylang=en
– Version 1.1
http://www.u2u.info/Blogs/Patrick/Lists/Categories/Category.aspx?Name=MOSS%202007
Tools:
http://blogs.msdn.com/sharepoint/archive/2007/08/22/just-published-major-update-to-the-moss-and-wss-downloadable-sdks-8-22-2007.aspx
Accessibility Kit for MOSS
http://blogs.msdn.com/sharepoint/
http://blogs.msdn.com/bgeorgi/default.aspx
Sharepoint Report Center and SQL Server Reporting
http://blogs.msdn.com/sharepoint/archive/2007/02/19/microsoft-sql-server-2005-sp2-reporting-services-integration-with-wss-3-0-and-moss-2007.aspx
Sharepoint Developer Reference :
http://msdn2.microsoft.com/en-us/sharepoint/default.aspx
http://msdn2.microsoft.com/hi-in/library/bb530301.aspx
Solution providers for MOSS:
http://blogs.tamtam.nl/mart/SolutionProvidersForMOSS.aspx
Branding :
http://msdn2.microsoft.com/en-us/library/aa830818.aspx
Sharepoint Designer
http://blog.solanite.com/keith/Lists/Categories/Category.aspx?Name=SharePoint%20Designer
http://www.sharepointcustomization.com/resources/presentations.htm
http://office.microsoft.com/en-us/infopath/HA102105871033.aspx
http://blogs.msdn.com/timpash/archive/2006/05/22/603758.aspx
Adding menus to List items
http://msdn2.microsoft.com/en-us/library/ms868274.aspx
http://blogs.msdn.com/jessicagruber/archive/2005/07/27/443895.aspx
http://blogs.msdn.com/bowerm/articles/175691.aspx
Infopath
http://blogs.msdn.com/infopath/
Info on AJAX
Using hidden field with update panel : http://forums.asp.net/p/1119208/1743351.aspx#1743351
SmartPart with AJAX :
http://weblogs.asp.net/jan/archive/2007/02/26/new-version-of-smartpart-now-with-ajax-connections.aspx
General Reading on How UpdatePanel work
http://www.ben-rush.net/blog/PermaLink.aspx?guid=c9bd8cb4-15af-4222-a74a-9d1f4d6baa41&dotnet=consultant
Many solutions on MOSS are available at : http://blogs.devhorizon.com/blogs/reza_on_blogging/default.aspx
Please use DataView to bind to GridView so that we can implement Paging and Sorting.
Please refer to following link for details : http://community.strongcoders.com/content/CSGridViewSortingPaging.aspx
http://www.codeproject.com/useritems/GridViewNeatPaging.asp
Content Type:
http://www.bloggix.com/blogs/microsoft/archive/2008/06/12/custom-list-with-content-type-and-site-column-implemented-with-a-lookup-field.aspx
http://sharepointers.blogspot.com/2008/04/adding-custom-content-type-to-site.html
http://msdn.microsoft.com/en-us/library/ms452896.aspx
http://msdn.microsoft.com/en-us/library/aa543822.aspx
content type without title
http://www.u2u.info/Blogs/karine/Lists/Posts/Post.aspx?List=d35935e0%2D8c0e%2D4176%2Da7e8%2D2ee90b3c8e5a&ID=6
lookup column as feature
http://sharepointnutsandbolts.blogspot.com/2007/04/creating-list-based-site-columns-as.html
List Definition:
http://ari.provoke.co.nz/archive/2007/04/18/creating-a-custom-sharepoint-2007-list-definition.aspx
http://officesharepointpro.com/content/839/Linking-to-documents-in-another-document-library.aspx
book link
http://www.devx.com/webdev/Article/34032/1763/page/3
free video
http://www.trainsignaltraining.com/sharepoint-services-part-2-learn-to-create-a-new-custom-list/2007-10-30/
create graph using sharepoint
http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!447.entry
22 April 2009
Hiding "View All Site Content"
Here is an alternative solution I figured for hiding the "View all site contents " from a site.

[Note: add <>
style>
#ctl00_PlaceHolderLeftNavBar_idNavLinkViewAll

{ Visibility:hidden; }
/style>
Also if you want the "View all site content" should be placed below Site Action button there is an artical published by Mark Wagner Click here to read more on this.
Special Thanks to Laura Rogers & Mark Wagner
FBA Login Name Customization
Here is an article added by Sridhar in which he has created a WebPart which will allow the user to alter the Welcome Name as needed.
For More Details click here.
Accordion-Style Left Navigation using JQuery
Before
All the Quick link menu provided by sharepoint out of Box has a fixed format and altering its CSS alters is branding.However we can achieve collapsing and expanding functionality using jQuery provided by Google’s API.

if you want the accordion-style menu for all pages, you should work it into the default.master. For now, i have carried by adding a Content Editor Web Part (CEWP) to the page. Add the code below to the web part’s Content Editor (source). Now your menu should look like this.
Here when you click on the menu header box with the down arrow image, it exposes the submenu below it and swaps the image with an ‘x’. Likewise, clicking the header with the ‘x’ will hide the associated submenu.
<--script-->--script-->
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load jQuery
google.load("jquery", "1.2.6");
</script>
<script type="text/javascript">
$(function(){
//initialize menus
var menuRows = $("[id$='QuickLaunchMenu'] > tbody > tr");
var menuHd = menuRows.filter("[id!='']:has(+tr[id=''])");
//set img path for when submenu is hidden
var closedImg = "/_layouts/images/Menu1.gif";
//set img path for when submenu is visible
var openedImg = "/_layouts/images/ptclose.gif";
var cssInit = {
"background-image": "url('"+closedImg+"')",
"background-repeat": "no-repeat",
"background-position": "100% 50%"
}
var cssClosed = {"background-image": "url('"+closedImg+"')"}
var cssOpen = {"background-image": "url('"+openedImg+"')"}
//hide submenus
menuRows.filter("[id='']").hide();
//apply initial inline style to menu headers
menuHd.find("td:last").css(cssInit);
menuHd.click(function ()
{
var styleElm = $(this).find("td:last")
var nextTR = $(this).next("tr[id='']");
if (nextTR.is(':visible'))
{
nextTR.hide();
styleElm.css(cssClosed);
}
else
{
nextTR.show();
styleElm.css(cssOpen);
}
});
});
09 April 2009
AJAX Tags for SharePoint Web.Config
OPTIONAL: ADD SUPPORT FOR ASP.NET AJAX
1. Add a
2. Add a
3. Add the following tag to the
4. Add some new registrations to the end of the
5. Add a new registration to the HttpModules section, beneath any existing registrations.
6. Add a SafeControl entry for the System.Web.UI namespace from Microsoft Ajax Extensions, within the
7. add the following configuration tags at the bottom of web.config, near the bottom before the end
Adding a ScriptManager into a SharePoint MasterPage
Open up the master page for your site. Typically, this will be located at
2) Add following Script block in master page
28 March 2009
Dyamic DataGrid
There would still be work to do but this will get the GridView there and gives a general idea of what to do with the columns.
GridView gDocuments = new GridView();
gDocuments.Visible = true;
gDocuments.ID = "gvDocs";
gDocuments.BackColor = System.Drawing.Color.Cornsilk;
gDocuments.BorderColor = System.Drawing.Color.
gDocuments.BorderWidth = System.Web.UI.WebControls.
gDocuments.RowCommand += new GridViewCommandEventHandler(
ButtonField bf1 = new ButtonField();
bf1.CommandName = "SelectRow";
bf1.Text = "Select This Row";
bf1.ButtonType = ButtonType.Button;
bf1.Visible = true;
gDocuments.Columns.Add(bf1);
pnlLayout.Controls.Add(
21 March 2009
Technical document write-up
In this article I will be sharing the key major sections and sub sections which need to be included in Technical Architecture document.
Enterprise Technical Architecture - Document Outline
Introduction
1.0 Project Overview
1.1 Background
1.2 Audience
1.3 References
1.4 Vision and Scope
1.5 Implementation RoadMap
2.0 Enterprise Architecture
Diagram showing all Environments with description
3.0 Development Environment (if applicable)
3.1 Logical Farm Architecture
3.2 Physical Farm Architecture
3.3 Databases Planning
3.4 Software Application Planning
3.5 Capacity Planning
3.6 Shared Services Strategy for Authentication, Search, BDC and Audiences
3.7 Application and Service Accounts
4.0 QA Environment (if applicable)
4.1 Logical Farm Architecture
4.2 Physical Farm Architecture
4.3 Databases Planning
4.4 Software Application Planning
4.5 Capacity Planning
4.6 Shared Services Strategy for Authentication, Search, BDC and Audiences
4.7 Application and Service Accounts
5.0 Authoring/PreProduction Environment (if Needed)
5.1 Logical Farm Architecture
5.2 Physical Farm Architecture
5.3 Databases Planning
5.4 Software Application Planning
5.5 Capacity Planning
5.6 Shared Services Strategy for Authentication, Search, BDC and Audiences
5.7 Application and Service Accounts
6.0 Production Environment (if applicable)
6.1 Logical Farm Architecture
6.2 Physical Farm Architecture
6.3 Databases Planning
6.4 Software Application Planning
6.5 Capacity Planning
6.6 Shared Services Strategy for Authentication, Search, BDC and Audiences
6.7 Application and Service Accounts
7.0 High level Application Technical Design
8.0 High level Application Technical Design
8.1 Business Processes and Application Flows
8.2 Branding and Look & Feel
8.3 Portal Site Topology/Taxonomy Design
8.4 WebParts
8.5 Features
8.6 Search and Indexing
8.7 Security
9.0 Operations and Maintenance
9.1 HelpDesk Strategy [Reference to Operational support document]
9.2 Release management and Deployment Strategy
9.3 Backup/Restore operations
9.4 Installation and Configuration [Reference to Installation & configuration
document for each server role]
10.0 Help System
10.1 User Manuals[Reference to user guide document]
11.0 Key Contacts
11.0 Assumptions
---
Special thanks to: Hemendra Patel
Dual Authentication in sharepoint
Dual Authentication