Monday, July 12, 2010

VB.Net Error on SharePoint feature deployment

VB.Net Error on SharePoint feature deployment

Before few days i had converting my C# code into and I faced one problem in Assembly reference part.

Failed to create feature receiver object from assembly "SampleWebFeature,version=,culture=nutral, Publickey Token=xxxxxxxxxxxx".

My same C# code working for this feature but code fire this error.

Almost I got the point, the problem occured in assembly reference and Reflector help me to identify the problem.

C#'s dll class refer : SampleWebFeature,version=,culture=nutral, Publickey Token=xxxxxxxxxxxx
VB.Net's dll class refer : SampleWebFeature.SampleWebFeature,version=,culture=nutral, Publickey Token=xxxxxxxxxxxx

Then opened Project's Property window and removed "SampleWebFeature" and then build DLL and checked in Reflector.

Both refer same then move dll to GAC and tried to activate feature and it worked.

Custom XSLT for the Search Core Results Web Part

Custom XSLT for the Search Core Results Web Part

Use below lines for getting default columns in xslt core result webpart.

Open Core Result web part in edit mode and change Out-of the Box XSLT with below lines.

Save this web part.

Now you can see default records in XML format.

Happy SharePointing...

Wednesday, July 7, 2010

Remove search scopes from Search scopes Dropdown list using JQuery.

Easy to remove Search scopes from Out Of the Box Search Scope Drop down list using JQuery.
Use below JQuery for remove Scopes from Dropdown list.


$("select[id$='SBScopesDDL'] option:contains('Scope2')").remove();
$("select[id$='SBScopesDDL'] option:contains('This Site:')").remove();