slimCODE

commUNITY
Welcome to slimCODE Sign in | Join | Help
in Search

slimCODE, aka Martin Plante

PostsPerMonth Web Control

Scott's post about a blog's heartbeat, and his Paint.NET template to create your own heartbeat image tag gave me the idea to try creating my own custom web control. For a non-web developer like me, that was fun. The following zip file contains the control, sources, and sample web page for testing.

PostsPerMonth.zip

Feel free to play with it! Don't forget to clean up the "ppm" subfolder when you change the image rendering function. This folder must be writable by the ASPNET user.

To use it in your page, register the control:

<%@ Register TagPrefix="slim" Namespace="SlimCode.Web.Controls" 
Assembly="SlimCode.Web.Controls.PostsPerMonth" %>

And declare your instance:

<slim:PostsPerMonthImage runat="server" Text="martinplante.com" 
PostsPerMonth="10" />

 

It will generate an image in the "ppm" subfolder, if this image is not already there.

6ppm

Have fun!

 

Published Tuesday, September 25, 2007 5:01 AM by slimcode
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit