Thursday, April 28, 2011

using list

http://www.c-sharpcorner.com/uploadfile/camurphy/csharplists03302006170209pm/csharplists.aspx

Wednesday, April 27, 2011

How to deploy the .wsp package using stsadm.exe

cd  "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"

 Add solution to your central administration, rename filename.wsp with your solution and path
stsadm -o addsolution -filename "E:\WSPBuilderProject1\WSPBuilderProject1.wsp"

 add stsadm command to comit the changes
stsadm -o execadmsvcjobs

 Deploy solution to your sharepoint site rename filename.wsp with your solution
stsadm -o deploysolution -name WSPBuilderProject1.wsp -url [http://moss] -allowgacdeployment -immediate -force


Wednesday, April 20, 2011

Sharepoint Event Recievers

Event Handlers
Event Handlers can be applied to List,Document Libraries and Content Types inside a Sharepoint Site.Event Handlers can be applied for different operations on a list item such as adding,updating and deleting the list item.

Synchronise and Asynchronous Events
The events ending with -ing(ItemAdding,ItemUpdating,ItemDeleting) are termed as Synchronised Events. In this senario the Event Handlers defined for the events are exected before the operation takes place on the Content Database.

 Asynchronous Events are the ones that end with -ed(ItemAdded,ItemUpdated,ItemDeleted).The Event Handlers for this events are executed after the operation occurs in the content database.

Base Classes
While developing event handlers there are several base classes from which you can inherit.

SPItemEventReciever: One must inherit from this base class if  you want the event handler to be executed when the item is added,updated and deleted.

SPListEventReciever: One must inherit from this base class when you want the event handler to execute when the structure of the list is modifed or the content type added or removed from the list.

SPFeatureEventReciever: Inherit this base class if you want your event handler to execute when the feature events such as installation,unstallation,activation and deactivation are executed.

SPWebEventReciever: You can Inherit this base class if you want your event handlers to execute when site is added or  removed from the site collection.

SPEmailEventReciever:Inherit this base class for creating a event handler for emails that are send to a Sharepoint list.