Random Post Link Generator Control for BlogEngine.Net

February 10, 2008 14:45 by ptumelty

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. 



Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Currently rated 4.3 by 3 people

  • Currently 4.333333/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

March 4. 2008 10:16

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

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

May 12. 2008 01:04