MarkItUp.WebControls.Timer
I've finally finished my first server control that is targetted as a public release. The control is a Timer control that generates optional client-side events and performs a server postback after a specified duration.
While building the control I borrowed heavily from the style, tips and ideas of (Metabuilders) Andy Smith and, to a large extent I must thank him for this product too :-)
Here's a piece of sample code that demonstrates how to interact with the control:
<%@ Register TagPrefix="miu" Namespace="MarkItUp.WebControls" Assembly="MarkItUp.WebControls.Timer" %> <script runat="server" language="c#" > private void MyTimer_Elapsed(object sender, MarkItUp.WebControls.TimerElapsedEventArgs e) { Response.Write( e.CommandName + "<br />" ) ; Response.Write( e.CommandArgument + "<br />" ) ; } </script> <form runat="server"> <miu:Timer id="MyTimer" runat="server" Interval="1000" CommandName="Foo" CommandArgument="Bar" ClientNotificationFunction="ClientNotify" MaxTicks="3" /> </form> <script language="javascript"> function ClientNotify( source, arguments ) { window.status = arguments.TickCount + " of " + arguments.MaxTicks ; } </script>
I'll upload both the control and the source code tomorrow.