Archive for September, 2007

Interesting query from a friend across the border :)

Today a friend from across the border scrapped me on orkut and asked an interesting question


is it necessary to install sharepoint to create the web parts? I have windows 2000?


"I have to use existing sharepoint webparts in my aspx page. for that do i need to install sharepoint ? "



Well this is quite a common question so I wanted to post the answer to it on my blog


So there are a few things we should keep in mind.


a)      To develop SharePoint webparts, we need a machine that runs Windows 2003, in case of any other operating system you can always Remote Desktop to work on another machine which has Windows 2003 this is quite a common practice.


b)      Webparts cannot run in complete isolation so you need to create a sample SharePoint site to play with the webparts you create.


c)   I assume SharePoint Service development is integrated with the Visual Studio .Net IDE on your machine (we’re talking about the .Net 1.1 framework. In .Net 2.0, Web Part development support is default) so that you have Web Part templates as you create a new project.

      d)  To make your life easy download Visual Studio 2005 Extensions 3. 0 for WSS, that really makes the webpart creating  process  quite easy. Click here to download Visual Studio 2005 Extensions for WSS.


Comments (2)


Comments (1)

New SharePoint server 2007 SDK with BDC editor Tool

Microsoft released updated Sharepoint Server 2007 SDK, available from the following link

This SDK includes some very usefull tools and samples like

  • Microsoft Business Data Catalog Definition Editor
  • Excel Services User Defined Function Sample
  • SAP Sample
  • Custom Content Source

Leave a Comment

MOSS Event Handlers

Today I want to talk in depth about a feature of Microsoft Office SharePoint Server 2007 (MOSS) that shows you just how extensible the SharePoint 2007 platform is! That feature is the ability to add custom event handlers to sites, lists, items and content. Fortunately I have a very very good document to share with you.
Click here to download the document and explore this great feature in detail !. I hope this helps you out a great deal in future I plan to write various kinds of Event Handlers and post step-by-step instructions as to how can we write them from scratch. So keep visiting .

Comments (1)

Top 10 Benefits of Microsoft Office SharePoint Designer 2007

Top 10 Benefits of Microsoft Office SharePoint Designer 2007
Courtesy of Microsoft

Office SharePoint Designer 2007 provides the powerful tools you need to deliver compelling and attractive SharePoint sites and quickly build workflow-enabled applications and reporting tools on the SharePoint platform, all in an IT-managed environment. Be more productive with next-generation Microsoft Web technologies.

Enjoy a new level of support for creating and customizing next-generation SharePoint Web sites and technologies.

Microsoft Office SharePoint Designer 2007 has deep editing support for the technologies underlying Microsoft Windows SharePoint Services technology, such as ASP.NET 2.0, cascading style sheets, and Microsoft Windows Workflow Foundation.
Customize SharePoint sites exactly the way you want. Customize SharePoint sites exactly the way you want.

Choose the format and content of your SharePoint pages with Office SharePoint Designer 2007—the customization tool for the entire SharePoint family. You can tailor SharePoint sites to your needs and set brand requirements using the latest ASP.NET technology, established Web standards such as XHTML, and cascading style sheets.
Easily make or undo changes across entire SharePoint sites. Easily make or undo changes across entire SharePoint sites.

Make format and layout changes to entire SharePoint sites simply by editing the master page and modifying the SharePoint cascading style sheets. Undo changes to the home page using the Revert to Site Template Page command in Office SharePoint Designer 2007.
Maintain control over site customization. Maintain control over site customization.

Site administrators and IT managers can control exactly how Office SharePoint Designer 2007 is used to help ensure information workers have an IT-managed and -compliant experience. Set up Contributor Settings for each role defined in the SharePoint site, and control access to specific actions.
Create workflows to automate business processes. Create workflows to automate business processes.

Automate business processes associated with SharePoint lists and document libraries using the Workflow Designer, a powerful and easy-to-use tool that comes with Office SharePoint Designer 2007. Set up custom workflow conditions and actions, link them to your SharePoint data, and deploy them with a single click, without installing server code.
Create interactive Web pages without writing code. Create interactive Web pages without writing code.

Office SharePoint Designer 2007 has a full set of tools to help you integrate data into SharePoint pages and present that data using XSLT in SharePoint sites. You can access tools for using XSLT Data Views, List View Web Parts, Web Part connections, ASP.NET controls, and workflow.
Integrate business data. Integrate business data.

Create views and forms for working with a variety of data sources using tools supported by Office SharePoint Designer 2007. Build SharePoint Web pages that present and edit data coming from SharePoint lists and document libraries, XML files, Microsoft SQL Server databases, Web services, and enterprise systems.
Develop sites compatible with a wide range of browsers and Web standards. Develop sites compatible with a wide range of browsers and Web standards.

Office SharePoint Designer 2007 has excellent support for creating Web pages based on Web standards such as XHTML and cascading style sheets and meeting Web accessibility requirements for Web Content Accessibility Guidelines WCAG and Section 508 (29 U.S.C. 794d), including built-in compatibility checkers for these standards.
Build advanced ASP.NET pages. Build advanced ASP.NET pages.

Office SharePoint Designer 2007 supports creating and editing ASP.NET pages. It provides the same level of support as Microsoft Visual Studio 2005 for ASP.NET control hosting, property editing, toolbox, and Microsoft IntelliSense technology in Code View.
Manage and help protect your site. Manage and help protect your site.

Use reports in Office SharePoint Designer 2007
to help manage your site by checking for broken links, unused pages, cascading style sheets usage, and master page usage. Site backup and restore features make it easy to save your site to a single file for helping to protect data or moving it to another server running Windows SharePoint Services technology.  

Comments (1)

STSADM for Windows

This .NET application presents a rich client GUI for the powerful command line STSADM.exe. Click on the link to download the file and save it to your computer. Click here to download  


Leave a Comment

Calculated fields

On this page you find an overview of different calculations which you can use:

  • Conditional formulas
  • Date and time formulas
  • Math formulas
  • Text formulas
  • … 

 Click here –> Examples of common formulas on the Microsoft Office site.

Comments (1)

U2U CAML Builder sharepoint feature

Karine Bosch has released her new version of U2U CAML Builder which is now a sharepoint feature instead of widnows application.
find more about this really useful feature in
Karine’s post
Click here to download.
Thanx Karine for such a wonderful tool  

Comments (2)

Creating web parts Visual studio 2005 extensions for WSS.

With Visual Studio 2005 Extensions for WSS its very easy to create a web part. Today I wanted to demonstrate how we can easily create a simple web part using Visual Studio 2005 Extensions for WSS .
 How to create a web part with Visual studio 2005 extensions for WSS. 
    Click here to download the document

Comments (2)

SPSiteDataQuery Samples for WSS v3

Nice Article I found on the Internet.
I have been playing with the SPSiteDataQuery a fair bit recently and thought it would be interesting to post some of the results.

When using the SPSiteDataQuery to perform a search there are four main properties you are going to set which determine the results you will get. If you have seen my previous post (XML results using SPSiteDataQuery in SharePoint) you will have seen that they are Lists, Query, Webs and ViewFields.

If you read nothing else then remember this…If you make a mistake in the Webs or Lists properties, invalid XML or invalid attributes, the SPSiteDataQuery will fall back to it’s default behavior and will not throw an error!! Knowing this can save a lot of time…ensure your properties are correctly formatted.

So, assuming the basic setup is

SPSiteDataQuery q = new SPSiteDataQuery();
q.Lists = "<Lists BaseType='1'/>";
q.Query = "<Where><Gt><FieldRef Name='ID' /><Value Type='Number'>0</Value></Gt></Where>";
q.Webs = "<Webs Scope='SiteCollection' />";
q.ViewFields = "<FieldRef Name='Title' /><FieldRef Name='ID' />"';
q.RowLimit = 10;

Here are the changes you can make to achieve different result sets and tips as to why the query could be failing.


The Webs Property

There are basically three different values for this…

"<Webs Scope=’SiteCollection’ />" This will search the entire site collection no matter which web you use to execute the query.
"<Webs Scope=’Recursive’ />" This will search the web on which you execute the query and recurse through any child webs.

"" If you leave it blank then it will only search the web on which you execute the query. No child webs will be queried. This is important as I have read on several other sites that this is not possible with SPSiteDataQuery, but it is!!

I would also point out that that if you get anything wrong with this property SharePoint will not throw an error, it will just default to the blank behavior…It will only search the web on which you executed the query. This is an important point as "<Webs scope=’Recursive’ />"  or "<Webs Scope=’recursive’ />" (small ‘s’ in Scope and small ‘r’ in recursive) look OK but are actually invalid and the query will default to only the current web.


The Lists Property

This defines what type of document libraries and lists WSS will search for your items. You can specify the exact type of list, the base type or even specific lists. Examples of the Lists property are…

"<Lists BaseType=’1’/>" As above, this will search all lists which are based on a ‘Document Library. This is useful if you only want to find documents. Other values for BaseType include…

0 – Generic list – This will search all lists and not document libraries.
1 – Document Library
3 – Discussion Forum
4 – Vote or Survey
5 – Issues list

(no, I don’t know what happened to number 2!!)

I should also point out that the default is to search BaseType = ‘0’ , and so if you do not set or make a mistake in the XML only lists will be searched.

"<Lists ServerTemplate=’850’/>" This will limit the search to only a particular list template (850 is the Pages template in a publishing site). The number is fairly random and is defined in the list definition. I haven’t needed to look at them as yet so I don’t know a better way than looking in the definitions in the FEATURES folder for SharePoint. If you make a mistake with this property it will revert to the default.

Another options is Hidden, which determines if hidden lists or document libraries are searched. This an additional attribute and would be used like this…

"<Lists ServerTemplate=’850′ Hidden=’TRUE’/>"

The MaxListLimit attribute specifies the total number of lists to search. You will receive an exception if the query exceeds the MaxListLimit. The default amount is 1000 and by setting this to 0 you can search everything. So the following would only search the first 50 lists…

"<Lists BaseType=’1′ MaxListsLimit=’50’/>"

Another thing you can do with the Lists property is to query specific lists. This can be done by specifying the Guid of the list you want to search. An example would be…

"<Lists><List ID="129AB4CAE-12EF-9871-DE45-F34A180D3EAB5"/></Lists>"

You would obviously need to know the Guid of the lists you wish to query before creating this property.


The ViewFields property

The ViewFields property specifies the fields (columns), that will be returned in the query. This is very similar to SQL and you should ensure that you specify any fields that you may wish to use in you Where or OrderBy part of the query.

Things to point out here is that that you can specify the ID(Guid) of the property or the name of the property…this is the Internal Name, not the name you may see in the UI. For example the standard publishing field "Image Caption" would become "PublishingImageCaption" as that is it’s internal name.

So, to add the "Image Caption" filed to the results we would need…

"<FieldRef Name=’Title’ /><FieldRef Name=’ID’ /><FieldRef Name=’PublishingImageCaption’ />"

Another thing to remember is that not all lists or documents libraries contain the same fields. If you are not worried about a particular field and want the item returned whether the field (column) exists or not the you can set Nullable to true. So if we have some items which may not have an ‘Image Caption’ column then we could use…

"<FieldRef Name=’Title’ /><FieldRef Name=’ID’ /><FieldRef Name=’PublishingImageCaption’ Nullable=’TRUE’/>"

and this would still find those items without an ‘Image Caption’ column (field).


The Query Property

This property will allow you to bot limit and order you results. You can do both or just one, but it is similar to SQL in what you can do. There is a lot to this, but I will give a couple of samples…

Querying by date…

string sLastWeek = SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Today.AddDays(-1));
q.Query = "<Where><Gt><FieldRef Name=’Created’><Value Type=’DateTime’>" + sLastWeek + "</Value></Gt></Where>";

This will find items created within the last week. The <Gt> denotes ‘Greater Than’, you could also use <Gte>, <Lt> or <Eq>. These can be combined to create more complex queries.

q.Query = "<OrderBy><FieldRef Name=’Title’ Ascending=’FALSE’></OrderBy>";

This will order the items descending by the title (Z-A).

q.Query = "<Where><Gt><FieldRef Name=’Created’><Value Type=’DateTime’>" + sLastWeek + "</Value></Gt></Where><OrderBy><FieldRef Name=’Title’ Ascending=’FALSE’></OrderBy>";

This is a combination of the above…items created in the last week ordered Z-A.

Finally, make sure you set the RowLimit property…you may not get any results otherwise!!

More information can be found on MSDN.

Comments (1)

Older Posts »