Skip to main content

Posts

Showing posts from September, 2011

Change the Display name for FBA Users

i:0#.f|mName|accountname mName = membershipprovideraliasinCentralAdmin accountname = account in Active Directory You would need to run a PowerShell command for the –Web parameter being the SiteCollection URL. You would need to login to that Site Collection at least once for the script to update the Display Name. This is something like alerts on a site will work for the user if we would have logged into that site collection at least once. Set-SPUser “ i:0#.f|mName|accountname”  -Web  http://sp2010/  -DisplayName "User Name"

Apply CSS in .Net Menu Control

<asp:menu id="NavigationMenu1" CssClass="menu1" staticdisplaylevels="3" staticsubmenuindent="0" orientation="Vertical" target="_blank" Font-names="Arial, Gill Sans" Width="100px" runat="server"> <LevelMenuItemStyles> <asp:MenuItemStyle CssClass="level1"/> <asp:MenuItemStyle CssClass="level2"/> <asp:MenuItemStyle CssClass="level3" /> <asp:MenuItemStyle CssClass="level4" /> </LevelMenuItemStyles> <StaticHoverStyle CssClass="hoverstyle"/> <items> <asp:menuitem text="Home" tooltip="Home"> <asp:menuitem text="Section 1" tooltip="Section 1"> <asp:menuitem text="Item 1" tooltip="Item 1"/> <asp:menuitem text="Item 2" tooltip="Item 2"/>...

SharePoint Calendar overlay

http://blog.furuknap.net/view-multiple-calendars-in-sharepoint-2010

Regular Expression Validation Custom Field Type

Regular Expression Validation Custom Field Type http://claytonj.wordpress.com/2007/05/15/regular-expression-validation-custom-field-type/ http://sharepointregex.codeplex.com/ https://ghamson.wordpress.com/2011/01/19/using-jquery-to-attach-regular-expression-validation-to-a-sharepoint-list-form-field-sp2010-ps2010-projectserver-in/

Edit / Display form Url

// Edit form full url string .Format( "{0}{1}?ID={2}" , item.Web.Url, item.ParentList.Forms[PAGETYPE.PAGE_EDITFORM].ServerRelativeUrl, item.ID); // Edit form relative url string .Format( "{0}?ID={1}" , item.ParentList.Forms[PAGETYPE.PAGE_EDITFORM].ServerRelativeUrl, item.ID); // Display form full url string .Format( "{0}{1}?ID={2}" , item.Web.Url, item.ParentList.Forms[PAGETYPE.PAGE_DISPLAYFORMServerRelativeUrl, item.ID); // Display form relative url string .Format( "{0}?ID={1}" , item.ParentList.Forms[PAGETYPE.PAGE_DISPLAYFORM].ServerRelativeUrl, item.ID);

Sharepoint Fields and update / retrive Values

Lookup Field Field Class: SPFieldLookup Field Value Class: SPFieldLookupValue Populating Information: item [ "FieldName" ]   =   new   SPFieldLookupValue ( "Title" );   // SharePoint will do the lookup as long as the LookupValue's are unique item.Update(); or item [ "FieldName" ]   =   new   SPFieldLookupValue ( 1 ,   "Title" ); item . Update (); Retrieving Information: SPFieldLookupValue  itemValue  =  item [ "FieldName" ]   as   SPFieldLookupValue ; int  id  =  itemValue . LookupId ; string  value  =  itemValue . LookupValue ; Multiple Lookup Field Field Class: SPFieldLookup Field Value Class: SPFieldLookupValueCollection Populating Information: SPFieldLookupValueCollection  itemValues  =   SPFieldLookupValueCollection (); itemValues . Add ( new   SPFieldLookupValue ( 1 ,   "Title" )); item [ "FieldName" ]   =  itemValues ; item ....

SharePoint 2010 Visual How Tos by Microsoft

v    Accessing SharePoint 2010 Data with the .NET Client Object Model v    Accessing SharePoint 2010 Data with the Silverlight Client Object Model v    Accessing SharePoint 2010 List Data by Using LINQ to SharePoint v    Accessing SharePoint 2010 Lists by Using WCF Data Services v    Adding Overlays to Drawings in Visio Services in SharePoint Server 2010 v    Adding SharePoint Project Items to SharePoint Projects in Visual Studio 2010 v    Calling Public Web Services from a Sandboxed Silverlight Application in SharePoint 2010 v    Creating an Excel Services and Bing Maps Mashup for SharePoint 2010 Using the Excel Services ECMAScript Object Model v    Creating Content Types for SharePoint 2010 in Visual Studio 2010 v    Creating Custom Extensions for SharePoint 2010 Development Tools in Visual Studio 2010 v    Creating Custom SharePoint 2010 Field Types v    Creating C...