Adding search to your ASP.Net site the easy way
Posted
Tue, Sep 6 2005 12:18 PM
by
Mischa Kroon
This is a great way to add search to a website, and it's so simple that you will probably love it.
The code needed:
string search = string.Format("http://beta.search.msn.com/results.aspx?q=site%3yoursitehere.com+{0}&format=rss",
HttpUtility.HtmlEncode(SearchText.Text));
RssFeed1.DataSource = search;
RssFeed1.DataBind();
RssFeed1 is a SKM RssFeed control which can be downloaded here.
Only thing to do after this is add some visually pleasing styles and your done.
An example of this in action can be found here.
This idea came from:
Ryan Farley's blog.