Posts

Bind dropdownlist to enum

public static ListItemCollection GetListItemsFromEnum ( Type enumType ) { ListItemCollection items = new ListItemCollection (); string [] names = Enum . GetNames ( enumType ); Array values = Enum . GetValues ( enumType ); for ( int i = 0 ; i <= names . Length - 1 ; i ++) { items . Add ( new ListItem ( names [ i ], values . GetValue ( i ). ToString ())); } return items ; }

SharePoint Add/Send Appointment Using Exchange Web Services (EWS)

Add Web Service  : https://domain/ews/services.wsdl try             {                 SPSecurity .RunWithElevatedPrivileges( delegate ()                 {                     EWS. ExchangeServiceBinding esb = new ExchangeServiceBinding ();                     esb.RequestServerVersionValue = new RequestServerVersion ();                     esb.RequestServerVersionValue.Version = ExchangeVersionType .Exchange2010_SP1;                 ...

ISO to USB

POWER ISO 4.8 or later Create Bootable USB Drive: Start PowerISO (v4.8 or newer version, download here). Insert the USB drive you intend to boot from. Choose the menu "Tools > Create Bootable USB Drive". The "Create Bootable USB Drive" dialog will popup. If you are using Windows Vista or Windows 7 / 8 operating system, you need confirm the UAC dialog to continue. In "Create Bootable USB Drive" dialog, click "..." button to open the iso file of Windows 7 or Windows 8. Select the correct USB drive from the "Destination USB Drive" list if multiple USB drives are connected to the computer. Choose the proper writing method. "USB-HDD" is recommended. Click "Start" button to start creating windows 7 / 8 bootable USB drive. * Cant create bootable usb drive POWER ISO   Try to format the usb to fat32. Then ran power iso in admin mode. Then used the create bootable usb tool. Chose the appropriate iso and ...

SharePoint 2007 Smart Web Part

Download WSP-Buidler Download WSP Builder Extensions 2010 Beta 1.4

Fix for object reference error that occurs while accessing GetDataTable() from SPListItemCollection

http://shivshankarg.wordpress.com/2013/01/04/fix-for-object-reference-error-that-occurs-while-accessing-getdatatable-from-splistitemcollection/

Caml Query with Lookup field

<Query>   <Where>     <Eq>       <FieldRef Name='Fruit' />       <Value Type='Lookup'>Grapes</Value>     </Eq>   </Where> </Query> <Query>   <Where>     <Eq>       <FieldRef Name='Fruit' LookupId='TRUE' />       <Value Type='Lookup'>15</Value>     </Eq>   </Where> </Query>

SharePoint Custom webpart with SharePoint resource files

Image
Step 1: First we need to create the visual webpart project in visual studio 2010. Step 2: After adding the visual webpart project, in the solution explorer, right click and add new sharepoint mapped folder and refer the folder Resources. Once the resource folder is mapped, right click and add the folder (since so many resource files are present in the 14\Resource folder used by sharepoint and we create our own folder and use it for the particular webpart /particular web application ). Lets call the folder as CustomResource folder. Step 3: Now add the resource file by right click on the CustomResource folder and add new item, select c#, and select the resource file, name it as CustomResource.resx Step 4: Add Empty Element named " App_GlobalResources" Step 5: In Solution Explorer, click on Show All Files icon to view all files. Open SharePointProjectItem.spdata files located under App_GlobalResources node. Add the relavent information to the xml file which includes ...