Posts

Bind the SharePoint List Values to DropDownList using SPDataSource

<SharePoint:SPDataSource runat ="server"  ID="spMaster"  DataSourceMode="List" SelectCommand="<Query><OrderBy><FieldRef Name='SortOrder' Ascending='true' /></OrderBy></Query>" >                                 <SelectParameters>                                 <asp:Parameter Name="WEbUrl" DefaultValue="/SiteName/" />                                 <asp:Parameter Name="ListName" DefaultValue="Your List Name Here" />                                 </SelectParameters>                                 </SharePoint:SPDa...

Set DateTimeControl Region

DtDueDate.LocaleId = Convert .ToInt32( SPContext .Current.Web.RegionalSettings.LocaleId);

Create Folder in Document Library Programmatically

SPDocumentLibrary _MyDocLibrary = ( SPDocumentLibrary )_MyWeb.Lists[ "Library Name Here" ];                  SPFolderCollection _MyFolders = _MyWeb.Folders;                 _MyFolders.Add(_MyDocLibrary.RootFolder.ServerRelativeUrl + "/" + ListItemID + "/" );                               _MyDocLibrary.Update();

Hide the ChangeView option from SharePoint 2010 Ribbon

Based on the KISS principle, there has to be an easier way - and there it is: As an example, if you want to hide the change view, then you can just use the following CSS: <style> #Ribbon\.List\.CustomViews\.DisplayView-Medium{ display:none; } </style>

SharePoint Document Counter Counts The Document Downloads

http://www.fivenumber.com/sharepoint-document-counter-counts-the-document-downloads/

List Join operation in SharePoint 2007 / 2010

Approach  1 private   static   void  FetchAllListsDataJoinUsingLinq() {      using  ( SPSite  _spSite =  new   SPSite ( "<Site Url>" ))     {          using  ( SPWeb  web = _spSite.OpenWeb())         {              SPList  placeList = web.GetList(web.Url +  "/lists/TouristPlace" );              SPQuery  ospPlaceQuery =  new   SPQuery ();              DataTable  dtPlace = placeList.GetItems(ospPlaceQuery).GetDataTable();              SPList  cityList = web.GetList(web.Url +  "/lists/City" );      ...

SharePoint List Template Id’s

http://mosshowto.blogspot.in/2009/04/sharepoint-list-template-ids.html