Martijn Veken


Just having
some fun with .NET

June 2006 - Posts

Create your own search provider for IE 7.0

Like FireFox Internet Explorer 7.0 now also has the possibility to search websites with the handy little search box in the upper right corner. It's very easy to create  your own OpenSearch description document and add it to IE to search other websites (perhaps your own).

The OpenSearch description document is an XML-document with the following structure:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>CodeProject</ShortName>
<Description>Use to search the CodeProject</Description>
<Tags>example web</Tags>
<Contact>admin@example.com</Contact>
<Url type="text/html"
template="http://www.codeproject.com/info/search.asp?cats=2&amp;cats=3&amp;cats=4&amp;cats=5&amp;cats=6&amp;searchkw={searchTerms}&amp;Submit1=Search&amp;author=&amp;sd=15+Nov+1999&amp;ed="/>
</OpenSearchDescription>

The template attribute is the search url of the site (for this example I used The CodeProject) and contains a special {searchTerms} tag. This is the place where your keywords will be inserted. For a complete specification of this document look here.

To add it to your browser just create a html page like this one:

<html>
<body>
<a href="#" onClick="window.external.AddSearchProvider('http://[your url]/codeproject.xml');">Voeg Codeproject aan je browser toe</a><br/>
</body>
</html>

I have created a sample page here with the CodeProject provider and one for BloggingAbout.Net (although the search function of this blog usually returns no results, will probably be solved in the next upgrade ;-).

 

Extensive agile resources list
For all you lightweight-lovers out there The Serverside .NET has published an extensive list of Agile resources on their site.
It covers the topics of philosophy, development, management, modeling, data and testing. You can find the list here.
Cool ASP.NET 2.0 trick
ASP.NET 2.0 has got a very cool and easy way to take your website offline:

Just place a file called app_offline.htm in the root of your website and your worker process will be stopped.
The static app_offline.htm page will then be served to the users of your site to inform them that your site is temporary offline.

To restart your site just remove (or rename) the file and your website is back online!

Now that's what I call cool!