Thursday, 17 December 2009
Wednesday, 16 December 2009
SharePoint Explorer in SharePoint 2010
Spec Explorer - advanced model-based specification and conformance testing tool
Doloto - AJAX application optimization tool
Doloto is an AJAX application optimization tool, especially useful for large and complex Web 2.0 applications that contain a lot of code, such as Bing Maps, Hotmail, etc. Doloto analyzes AJAX application workloads and automatically performs code splitting of existing large Web 2.0 applications. After being processed by Doloto, an application will initially transfer only the portion of code necessary for application initialization.
The rest of the application's code is replaced by short stubs -- their actual function code is transferred lazily in the background or, at the latest, on-demand on first execution. Since code download is interleaved with application execution, users can start interacting with the Web application much sooner, without waiting for the code that implements extra, unused features.
Monday, 14 December 2009
How to Increase your VMware Hard Disk's size
Sunday, 13 December 2009
Microsoft Project Code Named “Velocity” Community Technology Preview 3 (CTP3)
Saturday, 12 December 2009
How to add parameters from different sources to DataFormWebPart
<ExWebParts:EnhancedDataFormWebPart id="TasksDisplayDataFormWebPart" runat="server"
FrameType="None" NoDefaultStyle="TRUE" ViewFlag="1" Title="Tasks"
DisplayName="Tasks" __markuptype="vsattributemarkup"
__WebPartId="{418745AA-67C6-481e-95F9-5C824AD0CE61}" WebPart="true">
<DataSources>
<SharePointWebControls:SPDataSource runat="server" DataSourceMode="List"
UseInternalName="true" selectcommand="<View/>" id="SPDataSource1"><SelectParameters><webpartpages:DataFormParameter Name="ListName" ParameterKey="ListName"
PropertyName="ParameterValues" DefaultValue="Tasks"/>
</SelectParameters>
</SharePointWebControls:SPDataSource>
</DataSources>
<ParameterBindings>
<ParameterBinding Name="ListName" Location="None" DefaultValue="Tasks" />
<ParameterBinding Name="dvt_apos" Location="Postback;Connection" />
<ParameterBinding Name="UserID" Location="CAMLVariable"
DefaultValue="CurrentUserName" />
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate" />
<ParameterBinding Name="WebPartTitle" Location="None" DefaultValue="{Title}" />
<ParameterBinding Name="WebPartTitleURL" Location="None" DefaultValue="{TitleUrl}" />
</ParameterBindings>
<datafields>@ID,ID;@ContentType,ContentType;@Title,Title;@Modified,Modified;@Created,Created;@Author,Author;@Editor,Editor;@_UIVersionString,_UIVersionString;@Attachments,Attachments;@LinkTitleNoMenu,LinkTitleNoMenu;@LinkTitle,LinkTitle;@FileRef,FileRef;@FileDirRef,FileDirRef;@FSObjType,FSObjType;@ProgId,ProgId;@ScopeId,ScopeId;@DocIcon,DocIcon;@MetaInfo,MetaInfo;@Priority,Priority;@Status,Status;@PercentComplete,PercentComplete;@AssignedTo,AssignedTo;@TaskGroup,TaskGroup;@Body,Body;@StartDate,StartDate;@DueDate,DueDate;</datafields>
<XslLink>/Style Library/XSL Style Sheets/test.xsl</XslLink>
</ExWebParts:EnhancedDataFormWebPart>
Last thing you need to do is adding following lines into Style Library/XSL Style Sheets as test.xsl file .
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0"
exclude-result-prefixes="xsl msxsl ddwrt"
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:SharePoint="Microsoft.SharePoint.WebControls"
xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/> <xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:param name="WebPartTitle">
</xsl:param>
<xsl:param name="WebPartTitleURL"></xsl:param> <xsl:variable
name="dvt_1_automode">0</xsl:variable>
<xsl:template match="/">
WebPartTitleURL:<xsl:value-of select="$WebPartTitleURL"></xsl:value-of>
WebPartTitle:<xsl:value-of select="$WebPartTitle"></xsl:value-of>
<xsl:call-template name="dvt_1"/> </xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
</xsl:if>
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_1.rowview"/>
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview"> Title: <xsl:value-of select="@Title"/><br/>
</xsl:template>
</xsl:stylesheet>
Tuesday, 24 November 2009
Reduce VPCs size
create vdisk file=C:\SharePoint2010.vhd parent=C:\BaseWin2008.vhd
exit
Howto compact a vhd file
Mount Virtual Disk Precompactor.iso. Click ok to allow it to prepare your drive to be able to compacted.
4. Unmount the ISO from the CD menu.
5. Finally execute the Virtual Disk Wizard from the File menu and compact your VHD file.
Thursday, 19 November 2009
ADO.NET Data Services v1.5 CTP2
http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx
Thursday, 13 August 2009
Creating Proxy Object with Using Generic
{
public void MethodA()
{
Console.WriteLine("MethodA is called.");
}
}
public class ObjectB : MarshalByRefObject
{
public void MethodB()
{
Console.WriteLine("MethoB is called");
}
}
public class GenericProxyManager
{
private TObject _objectInstance;
public GenericProxyManager(TObject objectInstance) : base(typeof(TObject))
{
this._objectInstance = objectInstance;
}
public static TObject GetProxyObject()
{
TObject objectInstance = new TObject();
GenericProxyManager
TObject transparentProxyObject = (TObject)proxyObject.GetTransparentProxy();
return transparentProxyObject;
}
public override IMessage Invoke(IMessage msg)
{
IMethodCallMessage message = (IMethodCallMessage)msg;
// Unless you are sure the implementation covers only methods, you need to write some additional code for properties ( get/set )
if (message != null)
{
Console.WriteLine(message.MethodName + " has been handled before it called");
// Write necessary code here - this is before you invoke the method
object methodRetval = message.MethodBase.Invoke(_objectInstance, message.InArgs);
// Write necessary code here - this is after you invoke the method
ReturnMessage retVal = new ReturnMessage(methodRetval, null, 0, message.LogicalCallContext, message);
return retVal;
}
return null;
}
}
Lets execute the following code now
ObjectA obj = GenericProxyManager
obj.MethodA();
ObjectB obj2 = GenericProxyManager
obj2.MethodB();
Result will be
MethodA has been handled before it called
MethodA is called.
MethodB has been handled before it called
MethoB is called
Wednesday, 12 August 2009
Database Normalization
So what are these rules? There are five known normalization forms. Lets explain these one by one;
First Normal Form (1NF):
One row can contain only one information for a specific data.
Example;
WRONG: We have a Cars table and this table has a column called FuelType as nvarchar(255) and we are storing the data as
Cars | |
CarID | FuelType |
1 | "Petrol, Diesel" |
2 | "Diesel" |
3 | "Electric, Diesel" |
CORRECT: We need to create a new table called FuelTypes which will store all the fuel types and instead of using FuelType nvarchar(255) column, FuelTypeID int should be used and needs to be related to FuelTypes table.
FuelTypes | |
FuelTypeID | Name |
1 | "Petrol" |
2 | "Diesel" |
3 | "Electric" |
Cars | |
CarID | FuelTypeID |
1 | 1 |
1 | 2 |
2 | 2 |
3 | 3 |
3 | 2 |
Second Normal Form (2NF)
A table that has a lookup column (which is primary key in other table) can not contain any information from that lookup table.Example;
WRONG:
Services | ||
ServiceID | WorkerID | WorkerName |
1 | 2 | Serkant |
2 | 3 | Catherine |
Workers | |
WorkerID | WorkerName |
2 | Serkant |
3 | Catherine |
CORRECT:
Services | ||
ServiceID | WorkerID | |
1 | 2 | |
2 | 3 |
Workers | |
WorkerID | WorkerName |
2 | Serkant |
3 | Catherine |
Third Normal Form (3NF)
A table whose non-primary key fields are dependent only on the primary key and therefore have no dependence any other non-primary key field in the table.Example;
WRONG:
Services | ||
ServiceID | WorkerName | WorkerPhone |
1 | Serkant | 0777 777 7777 |
2 | Daniel | 0777 888 8888 |
CORRECT:
Services | |
ServiceID | WorkerID |
1 | 2 |
2 | 3 |
Workers | ||
WorkerID | WorkerName | WorkerPhone |
2 | Serkant | 0777 777 7777 |
3 | Daniel | 0777 888 8888 |
Fourth Normal Form (4NF)
A table can not contain two or more 1:n or n:m relationships that are not directly related.
Example;
WRONG:
Book Deliveries | ||
Bookstore | Book | Area |
Bookstore A | Book A | Area A |
Bookstore A | Book A | Area B |
Bookstore B | Book B | Area B |
Bookstore C | Book B | Area C |
CORRECT:
Bookstore Books | |
Bookstore | Book |
Bookstore A | Book A |
Bookstore B | Book A |
Bookstore B | Book B |
Bookstore Delivery Areas | |
Bookstore | Area |
Bookstore A | Area A |
Bookstore B | Area A |
Bookstore B | Area B |
Bookstore B | Area C |
Fifth Normal Form (5NF)
This form deals with cases where information can be reconstructed from smaller pieces of information that can be maintained with less redundancy.Example;
WRONG:
Salesman | Company | Product |
Salesman A | Company A | Product A |
Salesman A | Company A | Product B |
Salesman B | Company B | Product A |
Salesman B | Company B | Product B |
CORRECT:
Company Salesmen | |
Company | Salesman |
Company A | Salesman A |
Company B | Salesman B |
Company Products | |
Company | Product |
Company A | Product A |
Company A | Product B |
Company B | Product A |
Company B | Product B |
Salesman Products | |
Salesman | Product |
Salesman A | Product A |
Salesman A | Product B |
Salesman B | Product A |
Salesman B | Product B |
[SQL Server Performance] Speed up your query with covering index
So what is covering? Covering index is a technique of designing indexes for a table, not a type of index. I will explain this technique with an example.
Lets take Orders table from Northwind sample db. Orders table has a clustered index on CustomerID. We would like to see shipping fee for daily basis. To get this data execute to following query.
select OrderDate, SUM(Freight) from Northwind.dbo.[Orders] where group by OrderDate
As you can see from execution plan, it scans all clustered index data then sorting and grouping the result from index scan.
Lets put an index for OrderDate and Freight fields and see what happens
CREATE INDEX IX_OrderDate_Freight ON dbo.ORDERS(OrderDate, Freight)
then execute the same query
select OrderDate, SUM(Freight) from Northwind.dbo.[Orders] where group by OrderDate
It is directly accessing to the index and getting all the necessary information from index. Normally if sql scans a non-clustered index and there are some fields in the statement which does not exist in the index, Sql Server engine goes to original record to get the field values for every single record. This may cause a performance issue. In this example as it gets all necessary information from index it will speed up the query. Additionally as non-clustered index is sorted, it saves the engine from making additional sorting process.
Note: When you select your index, try to pick small size ones like smallint, integer, datetime. If you have bigger size fields then the implementation may cost more then you had. Try to prevent to put index on the table which has big number of insert/update/delete operations as well. Because everytime a record is changed, indexes will be reviewed from SQL Server Engine to see if they need to be sorted again.
Friday, 7 August 2009
Difference between Clustered and Non-Clustered Indexes
Following explains the methods we are going to use ;
* Lists all of a table's data and index pages
DBCC IND
(
['database name'|database id], -- the database to use
table name, -- the table name to list results
index id, -- an index_id from sys.indexes; -1 shows all indexes and IAMs, -2 just show IAMs
)
* Setting via trace flag 3604, It allows to instruct the engine to send output to the console
DBCC TRACEON(3604)
* DBCC PAGE statement lists the page header, data rows, and row offset table for any data page in a database.
DBCC PAGE ( {dbid | dbname}, filenum, pagenum [, printopt] [, cache]
Lets have a look how they stored by SQL;
1) Non indexed Table
Tables do not have a default index.
. Create the test table
Create Table TestTable
(
Id Int,
Name Varchar(255)
)
. Insert test data
Insert Into TestTable Values (3, 'Name3')
Insert Into TestTable Values (1, 'Name1')
Insert Into TestTable Values (2, 'Name2')
. Query the table
Select * From TestTable
. See the result
Id Name
-------------- ------------------
3 Name3
1 Name1
1 Name2
As there is no index, data was returned as the same order as they were inserted.
. See the structure of the data
Declare @dbID Int, @TableID Int
Set @dbID = db_id()
Set @TableID = object_id('TestTable')
DBCC ind(@dbID, @TableID, -1)
Here is the result
The columns mean:
* PageFID - the file ID of the page
* PagePID - the page number in the file
* IAMFID - the file ID of the IAM page that maps this page (this will be NULL for IAM pages themselves as they're not self-referential)
* IAMPID - the page number in the file of the IAM page that maps this page
* ObjectID - the ID of the object this page is part of
* IndexID - the ID of the index this page is part of
* PartitionNumber - the partition number (as defined by the partitioning scheme for the index) of the partition this page is part of
* PartitionID - the internal ID of the partition this page is part of
* iam_chain_type - see IAM chains and allocation units in SQL Server 2005
* PageType - the page type. Some common ones are:
1 - data page
2 - index page
3 and 4 - text pages
8 - GAM page
9 - SGAM page
10 - IAM page
11 - PFS page
* IndexLevel - what level the page is at in the index (if at all). Remember that index levels go from 0 at the leaf to N at the root page (except in clustered indexes in SQL Server 2000 and 7.0 - where there's a 0 at the leaf level (data pages) and a 0 at the next level up (first level of index pages))
* NextPageFID and NextPagePID - the page ID of the next page in the doubly-linked list of pages at this level of the index
* PrevPageFID and PrevPagePID - the page ID of the previous page in the doubly-linked list of pages at this level of the index
But we are only interested with PagePID, IndexID and PageType
Thursday, 25 June 2009
SPDataSource
and looping through in SharePoint Object library.
Today we will have a look at the SPDataSource. SPDataSource is an object
datasource which supply information from SharePoint by given parameters.
Here is a sample of SPDataSource syntax.
<SharePointWebControls:SPDataSource runat="server" DataSourceMode="List"
UseInternalName="true" selectcommand="<View/>" id="SPDataSource1">
<SelectParameters>
<webpartpages:DataFormParameter Name="ListName" ParameterKey="ListName"
PropertyName="ParameterValues" DefaultValue="Tasks"/>
</SelectParameters>
</SharePointWebControls:SPDataSource>
DataSourceMode:
(
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spdatasource.datasourcemode.aspx
)
• List: Retrieves
data from a list
<SharePoint:SPDataSource ID="SPDataSource1"
runat="server" DataSourceMode="List" UseInternalName="true"
SelectCommand="<Query><OrderBy><FieldRef Name='DueDate' Ascending='true'
/></OrderBy></Query>">
<SelectParameters>
<asp:Parameter
Name="ListName" DefaultValue="Tasks" />
<asp:Parameter
Name="WebID" DefaultValue="RootWeb" />
</SelectParameters>
</SharePoint:SPDataSource>
<asp:GridView ID="GridView1"
runat="server" DataSourceID="SPDataSource1" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Due Date"
DataField="DueDate" />
<asp:BoundField HeaderText="Priority"
DataField="Priority" />
<asp:BoundField HeaderText="Title"
DataField="Title" />
<asp:BoundField HeaderText="Status"
DataField="Status" />
</Columns>
</asp:GridView>
• ListItem: Retrieves
data from a single list item
<SharePoint:SPDataSource
ID="SPDataSource1" runat="server" DataSourceMode="ListItem"
UseInternalName="true" >
<SelectParameters>
<asp:Parameter
Name="WebID" DefaultValue="RootWeb" />
<asp:Parameter
Name="ListName" DefaultValue="Announcements" />
<asp:Parameter
Name="ListItemID" DefaultValue="1" />
</SelectParameters>
</SharePoint:SPDataSource>
<asp:GridView
ID="GridView1" runat="server" DataSourceID="SPDataSource1"
AutoGenerateColumns="false">
<Columns>
<asp:BoundField
HeaderText="Title" DataField="Title" />
<asp:BoundField
HeaderText="Expires" DataField="Expires" />
</Columns>
</asp:GridView>
• CrossList:
Retrieves data from multiple lists in multiple websites in the same site
collection.
<SharePoint:SPDataSource ID="SPDataSource1" runat="server"
DataSourceMode="CrossList" UseInternalName="true" SelectCommand="<Webs
Scope='Recursive'></Webs> <Lists ServerTemplate='106'></Lists> <View>
<ViewFields> <FieldRef Name='EventDate'/> <FieldRef Name='Title'/> <FieldRef
Name='Location'/ </ViewFields> <Query> <Where> <And> <Eq> <FieldRef
Name='Location'/> <Value Type='Text'>Your office</Value> </Eq> <Eq> <FieldRef
Name='EventDate'/> <Value Type='DateTime'><Today/></Value> </Eq> </And> </Where>
</Query> </View>" >
</SharePoint:SPDataSource>
<asp:GridView
ID="GridView1" runat="server" DataSourceID="SPDataSource1"
AutoGenerateColumns="false" Width="75%" HeaderStyle-HorizontalAlign="Left" >
<Columns>
<asp:BoundField
HeaderText="Date" DataField="EventDate" />
<asp:BoundField
HeaderText="Title" DataField="Title" />
<asp:BoundField
HeaderText="Location" DataField="Location" />
</Columns>
</asp:GridView>
• ListOfLists:
Retrieves properties of lists in a specified web site.
<SharePoint:SPDataSource ID="SPDataSource1" runat="server"
DataSourceMode="CrossList" UseInternalName="true" SelectCommand="<Webs
Scope='Recursive'></Webs> <Lists ServerTemplate='106'></Lists> <View>
<ViewFields> <FieldRef Name='EventDate'/> <FieldRef Name='Title'/> <FieldRef
Name='Location'/ </ViewFields> <Query> <Where> <And> <Eq> <FieldRef
Name='Location'/> <Value Type='Text'>Your office</Value> </Eq> <Eq> <FieldRef
Name='EventDate'/> <Value Type='DateTime'><Today/></Value> </Eq> </And> </Where>
</Query> </View>" >
</SharePoint:SPDataSource>
<asp:GridView
ID="GridView1" runat="server" DataSourceID="SPDataSource1"
AutoGenerateColumns="false" Width="75%" HeaderStyle-HorizontalAlign="Left" >
<Columns>
<asp:BoundField
HeaderText="Date" DataField="EventDate" />
<asp:BoundField
HeaderText="Title" DataField="Title" />
<asp:BoundField
HeaderText="Location" DataField="Location" />
</Columns>
</asp:GridView>
• Web: Retrieves
properties of subsites of the current web site.
<SharePoint:SPDataSource ID="SPDataSource1" runat="server" DataSourceMode="Webs"
IncludeHidden="true">
<SelectParameters>
<asp:Parameter
Name="WebId" DefaultValue="RootWeb" />
</SelectParameters>
</SharePoint:SPDataSource>
<asp:GridView
ID="GridView1" runat="server" DataSourceID="SPDataSource1"
AutoGenerateColumns="false">
<Columns>
<asp:BoundField
HeaderText="Site Title" DataField="__spTitle" />
<asp:BoundField
HeaderText="URL" DataField="__spUrl" />
<asp:BoundField
HeaderText="ID" DataField="__spID" />
<asp:BoundField
HeaderText="Web Template" DataField="__spWebTemplate" />
<asp:BoundField
HeaderText="Web Template Id" DataField="__spWebTemplateId" />
</Columns>
</asp:GridView>
SelectCommand: This is where we define our
query to get data. CAML is the query syntax. Custom parameters such as
QueryString, existing variables, programmatically defined
parameterbindings can be used.
SelectParameters (
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spdatasource.selectparameters.aspx
): That is used to define to
pass parameters into data control.
Following list states
what can be assigned as default values
WebID | ”RootWeb” for the root Web site. Otherwise, a string representation of a GUID such as the value of the SPWeb.ID property. |
WebURL | An empty string for the root Web site. Otherwise, a string containing a server-relative URL. |
ListID | A string representation of a GUID such as the value of the SPList.ID property. |
ListName | The value of the SPList.Title property. |
ListItemGUID | A A string representation of a GUID such as the value of the SPListItem.UniqueId property. |
ListItemID | A string representation of an integer such as the value of the SPListItem.ID property. |
RootFolder | The value of the SPFolder.Name property. |
FolderID | A string representation of a GUID such as the value of the SPFolder.UniqueId property. |
Additionally we can assign parameters from;
QueryString: <asp:QueryStringParameter Name="CompanyName"
QueryStringField="Company" DefaultValue="Contoso" />
Control: <asp:ControlParameter Name="CompanyName" ControlID="DropDownList1"
PropertyName="SelectedValue" />
ParameterBinding: <webpartpages:DataFormParameter Name="PostID"
ParameterKey="PostID" PropertyName="ParameterValues" DefaultValue="0"/>
Wednesday, 24 June 2009
DataFormWebPart
braking any SharePoint features.
In this scenario DataFormWebPart is our guidance. There are always other ways to
display the content like custom webparts/webpartpages, but developing with these
methods may cost us lots of time.
In the following example we will learn how to develop a simple DataFormWebPart.
This is the syntax we will work on it.
<WebPartPages:DataFormWebPart id="TasksDisplayDataFormWebPart" runat="server"
FrameType="None" NoDefaultStyle="TRUE" ViewFlag="1" Title="Tasks"
DisplayName="Tasks" __markuptype="vsattributemarkup"
__WebPartId="{418745AA-67C6-481e-95F9-5C824AD0CE61}" WebPart="true">
<DataSources>
<SharePointWebControls:SPDataSource runat="server" DataSourceMode="List"
UseInternalName="true" selectcommand="<View/>" id="SPDataSource1">
<SelectParameters>
<webpartpages:DataFormParameter Name="ListName" ParameterKey="ListName"
PropertyName="ParameterValues" DefaultValue="Tasks"/>
</SelectParameters>
</SharePointWebControls:SPDataSource>
</DataSources>
<ParameterBindings>
<ParameterBinding Name="ListName" Location="None" DefaultValue="Tasks" />
<ParameterBinding Name="dvt_apos" Location="Postback;Connection" />
<ParameterBinding Name="UserID" Location="CAMLVariable"
DefaultValue="CurrentUserName" />
<ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate" />
<ParameterBinding Name="WebPartTitle" Location="None" DefaultValue="{Title}" />
<ParameterBinding Name="WebPartTitleURL" Location="None" DefaultValue="{TitleUrl}" />
</ParameterBindings>
<datafields>@Title,Title;@ID,ID</datafields>
<XslLink>/Style Library/XSL Style Sheets/SPTest/FullContent.xsl</XslLink>
</WebPartPages:DataFormWebPart >
Now let’s have a look at the properties;
a) DataSources: This defines where the data to get from We have some controls to
get the data, here is some of them;
i) SPDataSource: Gets the data from single or multiple (cross, we
will mention it in later blogs) SharePoint libraries content.
DataSourceMode:
• List: Retrieves
data from a list
• ListItem: Retrieves
data from a single list item
• CrossList:
Retrieves data from multiple lists in multiple websites in the same site
collection.
• ListOfLists:
Retrieves properties of lists in a specified web site.
• Web: Retrieves
properties of subsites of the current web site.
SelectCommand: This is where we define our
query to get data. CAML is the query syntax. Custom parameters such as
QueryString, existing variables, programmatically defined
parameterbindings can be used, but it will be shown on feature blogs.
SelectParameters: That is used to define to
pass parameter binding values and also other type of parameters.
ii) SPXmlDataSource:
<SharePoint:SPXmlDataSource runat="server">
<DataFileParameters>
<WebPartPages:DataFormParameter Name="FileName" ParameterKey="FileName"
PropertyName="ParameterValues" DefaultValue="items.xml"/>
<WebPartPages:DataFormParameter Name="FilePath" ParameterKey="FilePath"
PropertyName="ParameterValues" DefaultValue=""/>
</DataFileParameters>
</SharePoint:SPXmlDataSource>
b) ParameterBindings: To supply user defined or environment defined values to
the actual query.
c) DataFields: Fields those are used in xsl.
d) XSLLink: Xsl file to display content in a custom format.
Sample of the following code xsl;
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0"
exclude-result-prefixes="xsl msxsl ddwrt"
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:SharePoint="Microsoft.SharePoint.WebControls"
xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/> <xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:param name="WebPartTitle">
</xsl:param>
<xsl:param name="WebPartTitleURL"></xsl:param> <xsl:variable
name="dvt_1_automode">0</xsl:variable>
<xsl:template match="/">
<xsl:call-template name="dvt_1"/> </xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
</xsl:if>
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_1.rowview"/>
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview"> Title: <xsl:value-of select="@Title"/><br/>
</xsl:template>
</xsl:stylesheet>