Click here to Skip to main content
11,933,180 members (66,294 online)
Click here to Skip to main content
Add your own
alternative version


18 bookmarked

Triple State Checkbox for Web

, 12 Mar 2007
Rate this:
Please Sign up or sign in to vote.
Triple State Checkbox for Web with Changeable CSS
Screenshot - TripleStateCheckbox.jpg


In the case of inputting three states from the user, the checkbox fails. We can use Dropdown but it doesn't look so good. So, I thought of creating a triple-state-checkbox, just like Win Forms. This control uses the CSS to show three states of the checkbox. Currently, it returns 255 (byte's max value) for not selected, 0 - not selected and 1 for selected.


This control is an extension of composite control which uses the Image and a Label control to

Using the code

Download the attached ZIP file which has a project named "YControls". Attach this project to your existing project or directly use the DLL from the BIN/debug folder of YControls project.


Registering the control to be available on all Forms. You can use any tagPrefix are per your stadards.

    <add namespace="YControls" assembly="YControls"  tagPrefix="YControls" />

Other Dependencies (CSS / Images)

Style.CSS and Images folder is currently bundled for the sample application. These are required. These can be changed as per requirement and themes can be applied.

Points of Interest

The application is not something which is differently coded, but the idea of trip-state-checkbox is new to web based forms, and found very useful in the cases of Yes/No/Default or anything which has something to do with triple-state.


This is the first version of triple-state-checkbox.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Yen Dutt
Web Developer Airtel Broadband
India India
Despite my lack of interest, started trying coding at the age of 15 in Visual FoxPro. Got introduced to ASP in 2003 and started working for a US based client for a Youth Sports Management Application. In 2005, got Introduced to ASP.NET/ VB.NET and since then, it has become my passion. Recently joined Rapidigm Inc. as a software developer and looking forward to expand my knowledge base by sharing information with fellow coders in the Web World.

My interests include listening to music, trekking, traveling apart from coding!

You may also be interested in...

Comments and Discussions

GeneralThanks for the control Pin
Vittorio Morellini30-Jul-15 0:51
memberVittorio Morellini30-Jul-15 0:51 
GeneralPostback error Pin
mirshahreza30-Jul-10 21:12
membermirshahreza30-Jul-10 21:12 
GeneralChange image to ImageButton, to be able use the keyboard for input Pin
Member 238272223-Jan-09 6:42
memberMember 238272223-Jan-09 6:42 
GeneralHelp using the control... Pin
john.kramer6-Jun-07 8:55
memberjohn.kramer6-Jun-07 8:55 
GeneralRe: Help using the control... Pin
Yen Dutt6-Jun-07 19:56
memberYen Dutt6-Jun-07 19:56 
GeneralNice work but this is not an article Pin
aromr25-Mar-07 15:12
memberaromr25-Mar-07 15:12 
GeneralRe: Nice work but this is not an article Pin
Napoleon9th21-Sep-09 9:12
memberNapoleon9th21-Sep-09 9:12 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.151126.1 | Last Updated 12 Mar 2007
Article Copyright 2007 by Yen Dutt
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid