Random Post Link Generator Control for BlogEngine.Net

February 10, 2008 14:45 by Admin

If you are familiar with Wikipedia, you may have seen the random article link which selects a random page from the many thousands. This small extension does something similar.

At the moment this just renders a hyperlink which points to a randomly selected post.  I hope to update this soon and turn it into a templated control so you can specify how the control is rendered and instead of using a plain hyperlink, maybe use an image or button, or whatever else you can think of

To install and use the extension, simply upload the file into the app_code\controls folder and insert the following code into your site.master page

<blog:RandomPost ID="RandomPost1" LinkTitle="Random Post" runat="server" /> 

You can download the file below:

RandomPost1.0.zip (836.00 bytes)

You can see the control in use in the left hand navigation bar just before the file download stats. 


Comments

3/4/2008 10:16:41 AM #

Rick

Hi, I am trying to do something similar, but I want to display a random post from a remote feed, specifically a product from my spreadshirt shop.  I'll let you know how I get on.

Rick United Kingdom

5/8/2008 12:35:11 PM #

Tagesgeld Einlagensicherung

That´s a nice extension - thank you

Tagesgeld Einlagensicherung Germany

7/13/2008 10:49:12 PM #

ptumelty

Apologies to anyone whose had trouble trying to download this, this was due to migration to BE.Net 1.4 and should now be resolved.

ptumelty United Kingdom

8/20/2008 5:48:23 AM #

Shashi

Good work ...!

Shashi India