Posts

Showing posts from October, 2012

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:SPDataSource>

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/