For those Sitecore lovers..

When you code against Sitecore, whether against renderings or sublayouts, I'd suggest you have a look at the very useful methods defined in Sitecore.Web.WebUtil Class. Those methods will help save you some time and prevent you from re-inventing the wheel. Some methods worth mentioning are :-

Aliases in Sitecore

Sitecore has the concept of "Aliases", whereby each item can accessed using a specific name (rather than the default path). Aliases are turned on by default. To turn them off, you can flip the web.config settings name AliasesActive to false (But who would want to do that???? )

Space Characters in Sitecore

When you create an item in Sitecore, you free to choose the naming of your item (provided it succesfully validates against some key rules .e.g Item name cannot contain :,?.. otherwise, you will end up with a "Item xxx is not a valid name"). Most of the time, you will want to put spaces in the item name. Let's take an example:

If an item (at the root level) has an item name of "John Doe", the url of the actual page should theoretically be http://hostname/John%20Doe .

Of course, you can get rid of this spacing issue by specifying an Alias of John-Doe on the item itself. But imaging you having hundreds of items with spaces !!!..

The encodeNameReplacements element in the Web.config

This encodeNameReplacements settings allow you to globally replace any unwanted character in your url to a character of your choice. So, rather than creating an alias for each item (without spaces), we can add the following new setting.

Orginally incorporated in Opera, the SpeedDial feature has proved to be an asset for day-to-day web browsing. The whole point of the SpeedDial is to make browsing your TOP N favourite websites as easy as possible.

It didn't take long for the other competitors to follow suit.

Internet Explorer

IE7PRO has created an addon for IE7. Its FREE and packed with loads of features and configuration options (Easy Homepage <==> Speed Dial). It's just too bad that the x64 bit version hasn't yet been released. All in all, this is the ultimate plugin for IE7.

Firefox

The Firefox addon created by Josep del Rio is pretty much geared towards the SpeedDial concept (unlike IE7Pro, which has many other features). The cool thing about this addon is that you can export your settings for your speed dials and import them later on another firefox browser. The current release is Speed Dial 0.7.2.6 and can be accessed at https://addons.mozilla.org/en-US/firefox/addon/4810.

When you implement this interface in your class, the code (if it's well written ) will compile just fine. The moment you update your service reference, it all goes crazy. The Error Message is "The Request failed with the error message : Cannot have two operations in the same contract with the same name".

The resolution is to add the Name attribute to the OperationContract on each method defined in the interface.

WebService Location

The Url for the webservice is usually in the form of http://servername:portnumber/_vti_bin/Search.asmx

PS: Make sure you enter the actual server name instead of the IP address. Otherwise, you might end up with an ArgumentNull Exception when trying to invoke the QueryEx webmethod.

PS: Always call the Status Webmethod (returns "ONLINE" if the search service is up and running) prior to actually querying MSSE 2008.

Crawling Content

To be on the safe side, always add a crawl rule with a path of http://www.targetsitetocrawl.net/* and a crawl configuration of "Crawl complex URLs (URLs that contain a question mark (?))". Otherwise, the crawler will ignore pages that contain querystrings. Big thanks go to David for pointing this out to me.

Search Scopes

You would use search scopes where you may want to query within "specific parts of a collection". This is analogous to collection/subcollections in Google Mini. The gotcha here is that if you specify a search scope in your query (either SQL-Like query or keyword based query), you might end up with an "Scope in your query does not exist. " error message. This is not the end of the world. The problem here is that you search scope is supposed to be SHARED across the Shared Services Provider. Now, how do we create a shared scope? It's kinda hard to figure this one out. When you normally create a search scope, there is no option to choose whether or not the scope can be shared.

Creating a Shared Scope in MSSE 2008.

The only way I found to create a shared Scope is to create a search scope using the normal approach (Scopes for this search Server ->New Scope). Once you return to the View Scopes page, notice that there is no Create Shared Scope on the drop down list for the target search scope. The current url looks like : http://servername/_layouts/viewscopes.aspx?mode=site. Substitute the mode=site querystring key pair with mode=ssp and hit Enter. You are now in Shared Services Provider mode. When you view the items in the drop down for your search scope, you now have an option to "Make Copy as Shared". Once this is clicked, a Shared Scope with a name of "Copy of .." is created. Of course, do not forget to add rules to your search scope.

You can then manually update your new search scope on the Search Administration Home Page. Once the update is complete, you can use your name of shared scope in your Query XML. One thing i noticed is that there is no place where I can update the name of the Search Scope. weird.. If you know how to do this, please drop me a few lines. i'd be interested to know :P

Word Stemming

This is disabled by default. To enable stemming, you need to perform a basic search on the Search Center Site. On the result page, go to Site Settings -> Edit Page. Edit the webpart Search Core Results (Modify shared webpart). Expand Results Query Options. Make sure the checkbox Enable Search Term Stemming is checked. Voila !!

I hope this is enough to get you going with Microsoft Search Server Express 2008.

Ryan Olshan has created a nice article about Paging and Sorting in a Gridview without using an ObjectDataSource. It's pretty nifty and gives you an insight at you can programmatically do with a GridView.

I've been working on Part Two of the solution (obviously,this builds upon the work done in Part One), which is about binding the Categories collection to a treeview control, thus making life a lot easier on the backend page. Walkthrough of Part Two

I do reckon that there is a lot to read on those two articles ..but I hope it's well worth it !!

I've been following up the success of BlogEngine.Net closely and amongst its successful releases, I noticed that the Category List control has hardly changed at all. Am I being too fussy here or is it time for a change? I must admit that BlogEngine.Net is based on a rock-solid platform and has indeed exceeded my expectations in terms of architecture and extensibility.

[Kudos to the BlogEngine Team]

The purpose of this article is to outline the steps required to produce a nested list of categories from BlogEngine.Net.

I'm currently working on PART TWO of the article. Well, you ask, what is PART TWO about? In a nutshell, it will allow you to bind the Category List to a treeview control (for use in the admin section).