|
-
Oct 2nd, 2004, 03:39 PM
#1
Thread Starter
Banned
check box no click event?
Why doesnt asp.net have a click event for check boxes?
I NEED a click event...
the click change event doesnt fire when i click a check box on my asp page...
Just like a button click i need a check box click..any suggestions...
I need to be able to click on a check mark and have it execute some code.
The code I want to run should be in the click event of this check box but I cannot find this check box event ?
Please advise...
Thanks,
Jon
-
Oct 4th, 2004, 02:13 AM
#2
I've juts checked this out...hahaha get it? Boom boom.
Anyways, I thought it was you being American, but you are right...I can't get the CheckedChanged event to fire either 
Booooooo bad MS *slap*
WOka
-
Oct 4th, 2004, 09:16 AM
#3
Lively Member
very good quest.
hay gui,
add the attribute onclick for checkbox in ur page to fire the event.
Use chkbox.attrubite.add("eventname","Javascript:function name")
v.r.mahendran
-
Oct 5th, 2004, 07:51 AM
#4
Retired VBF Adm1nistrator
Or manually enter it via javascript yourself.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 5th, 2004, 02:17 PM
#5
I wonder how many charact
A click on a checkbox is client-side... not server side. Therefore, it would be silly to include it in the framework. Just like a textbox doesn't have a click event.
-
Oct 6th, 2004, 01:54 AM
#6
New Member
I think checkbox has a method is IsPostBack=True or False. Therefore this method can replace for Click Event.
Or maybe MS think that no need
If you want it, you can create a new checkbox control has the Click Event.
BTW: you want click event run at server or client. If you want it run at client you can use the javascript or else you can do above. Means that you should create your own control.
-
Oct 6th, 2004, 11:22 PM
#7
PowerPoster
I don't know if you solved this or not, but you need to set the AutoPostBack property to true, then double click the control in the designer which will wire up the checkedchanged event. It will then fire when someone checks or unchecks it right away.
The key is the AutoPostBack property. It signals that action on it causes a post back. Textboxes, checkboxes, listboxes, comboboxes, etc need this set to true if you want immediate action to be taken.
Pick up a book, it really would be valuable. This is all explained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|