Click here to Skip to main content
15,867,308 members
Articles / Web Development / ASP.NET

Zeta Web Control Library

Rate me:
Please Sign up or sign in to vote.
4.81/5 (16 votes)
26 Jan 2010CPOL2 min read 35.4K   1.2K   35   2
A small set of enhanced ASP.NET controls (e.g. an AJAX-enabled ClickOnceButton)

Introduction

Zeta Web Control Library is a .NET 2.0 class library that provides you with some enhanced ASP.NET 2.0 web controls.

What's In?

The library contains the following controls:

  • An enhanced version of Eric Plowe's ClickOnceButton control. This is a button control that disables itself after being clicked for avoiding that the user clicks the button twice.
  • An enhanced version of Peter Bromberg's SessionTimeoutControl control. This allows for redirecting to an URL when a user's session timed out.
  • An enhanced GridView control. This control enables you to persist a sort state to an external storage of your choice by subscribing to events or deriving from the control and overriding virtual functions.

The enhanced ClickOnceButton has additional features for working well in an ASP.NET AJAX environment as well as for disabling other buttons on a page, either all or selectively:

XML
<zeta:ClickOnceButton 
    DisableAfterClick="true"
    Mode="ThisAndRelatedButtons"
    runat="server" 
    ID="CmdSave" 
    Text="Save" 
    OnClick="CmdSave_Click">
        <zeta:RelatedButton ButtonControlID="CmdCancel" />
        <zeta:RelatedButton ButtonControlID="CmdDeactivate" />
        <zeta:RelatedButton ButtonControlID="CmdActivate" />
        <zeta:RelatedButton ButtonControlID="CmdReleaseImmediately" />
</zeta:ClickOnceButton>

Using the Code

To include the code in your own ASP.NET web project, add a reference to the "ZetaWebControlLib.dll" to your project.

Next, add a control reference to the controls in the library. This can be done either on each ASPX page where you want to use a control, or centrally in the "web.config" file.

In the "web.config" file, the syntax is:

XML
<add tagPrefix="zeta" namespace="ZetaWebControlLib.Button" assembly="ZetaWebControlLib"/>

To reference the control on a single ASPX page (or in an ASCX control), add the following reference at the top of the file:

ASP.NET
<%@ Register Namespace="ZetaWebControlLib.Button" TagPrefix="zeta" %>

To finally create an instance of a control on your ASPX page (or in your ASCX control), use the following syntax:

XML
<zeta:ClickOnceButton 
    runat="server" 
    DisableAfterClick="true"
    ID="CmdOK" 
    Text="Submit the form"
    OnClick="CmdOK_Click" />

Points of Interest

While this article is mostly a very brief overview and does not go into implementation details, I still hope that you like it and that I've shown enough to enable you to decide whether a control in here is usable for your scenario.

For questions, comments and feedback (which I love to hear!) please use the comments section below at the bottom of this article.

History

  • 2010-01-26 - Added missing file from source package
  • 2009-11-26 - First release to CodeProject.com

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer Zeta Software GmbH
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.

➡️ Give me a tip 🙂

In his free time, he does climbing, running and mountain biking. In 2012 he became a father of a cute boy and in 2014 of an awesome girl.

Some cool, free software from us:

Windows 10 Ereignisanzeige  
German Developer Community  
Free Test Management Software - Intuitive, competitive, Test Plans.  
Homepage erstellen - Intuitive, very easy to use.  
Offline-Homepage-Baukasten

Comments and Discussions

 
GeneralClickOnceButtonAsyncPostbackBehavior.js is missing Pin
Jun Xia26-Jan-10 7:39
Jun Xia26-Jan-10 7:39 
GeneralRe: ClickOnceButtonAsyncPostbackBehavior.js is missing Pin
Uwe Keim26-Jan-10 8:21
sitebuilderUwe Keim26-Jan-10 8:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.