Saturday, April 18, 2009

Enable debugging in SharePoint

Open C:\Inetpub\wwwroot\wss\VirtualDirectories\sitedir\web.config You should also configure your SharePoint site to display any error messages that are generated by setting the customErrors tag's mode attribute to Off (the default setting suppresses all error messages): To get the full list of called modules listed on the error screen, you'll also need to set the SafeMode's CallStack attribute to "true":

Insert data into the splist

Monday, April 13, 2009

Application pages in sharepoint

<%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>

Saturday, April 11, 2009

difference between .dwp and .webpart

The difference is .dwp was the file extension used in version 2 of SharePoint and .webpart is a new extension used in version 3.

Sunday, April 5, 2009

SharePoint CAML Query

//Products list should have Price col, and productName col. it gets the data of products which r price >10 and <50 SPWeb web = new SPSite("http://spdevserver:12261/sites/spsite1/").OpenWeb(); SPList list = web.Lists["Products"]; SPQuery query = new SPQuery(); string str = "1050 10 40"; query.Query = str; SPListItemCollection items = list.GetItems(query); foreach (SPListItem item in items) { System.Console.Write(item.DisplayName); System.Console.Write("\n"); }

Followers