Posts

Showing posts from 2010

Custom Search Scopes at Site Collection Level

static void GetAvailableScopes()         {             SearchContext searchContext;             using ( SPSite site = new SPSite ( "Your Site Collection URL" ))             {                 searchContext = SearchContext .GetContext(site);                 Scopes scopes = new Scopes (searchContext);                 foreach ( Scope scope in scopes.AllScopes)                 {                                        Console .WriteLine( "\t Scope Name: {0}" , scope.Name);                     }             }         }   static void CreateScope()         {             SearchContext searchContext;             using ( SPSite site = new SPSite ( "Your Site Collection URL" ))             {                 searchContext = SearchContext .GetContext(site);                 Scopes scopes = new Scopes (searchContext);                 Scope newScope = scopes.AllScopes.Create( "Your Custom Scope" , "Scope Desc" , new Uri (site.U

Sharepoint 2010 Client Object Model Mechanics

Image
The following post explains about Sharepoint 2010 Client Object model. http://msdn.microsoft.com/en-us/library/ee857094.aspx  

Debug GAC Assembly

The following post explains Debugging the GAC Assembly without coping .pdb file into GAC. http://www.elumenotion.com/Blog/Lists/Posts/Post.aspx?ID=23

Entity Framework 4.0 and POCO Performance

This link explains Entity Framework 4.0 and POCO Performance http://sharedtolearn.blogspot.com/2010/05/entity-framework-40-poco-performance.html

Java Script Best Practices

Java Script best Practices http://www.javascripttoolbox.com/bestpractices/

Sharepoint 2010 Master Page Branding (Known as Minimal Master Page)

The following two URLs explains sharepoint 2010 Master Page Branding: http://msdn.microsoft.com/en-us/library/ee354191.aspx http://msdn.microsoft.com/en-us/library/ee354190.aspx

ASP.Net 4.0 Enhancements

http://www.codeproject.com/KB/aspnet/Whatis_New_ASP_Net_4.aspx

Design Patterns

The following link explains four design patterns using real time example. 1) Observer Pattern (Behavioral) 2) Strategy Pattern (Behavioral) 3) Decorator Pattern (Structural) 4) Builder Pattern (Creational) http://amazedsaint.blogspot.com/2008/01/design-patterns-part-i-and-ii.html

How to sort AlphaNumerics values in SQL Server?

Column Name [Revision] with Alphanumerics. Type – varchar(5) Sample Data as follows: A B 1 10 2 30 4 5 6 7 10 C D  Sort Revisions by Order By clause: Select Revision from [#Table1] ORDER BY CASE WHEN Revision LIKE '%[^0-9]%' THEN 99999               ELSE CONVERT ( INTEGER , Revision ) END , Revision Above query select revision and if revision is not numeric value, assigns 99999 values for nonnumeric data. If Revision has numeric value it converts into Integer and Orders the Revision value.