Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 6th, 2006, 08:43 PM
Posts: n/a
Default Check all Checkboxlist items on client-side

Please help me guys..

I have a checkboxlist which items are taken from the database.
I have also two buttons, one is to check all the items and the other is to uncheck it.
Also, there is a datagrid which items are loaded during page_load.

Now, every time I click either of the two buttons, yes, it will check or uncheck all the items, but the items of the datagrid becomes empty.
I have read some articles that maybe it's because of the postback thing. So instead of doing it server-side, I was advised to do it on the client-side.

My problem now is how can I uncheck or check all items in client-side?

Please help me.
I badly need it. Thanks a lot.
  #2 (permalink)  
Old July 7th, 2006, 08:13 AM
Authorized User
Join Date: Jun 2006
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

Client side is nothing but a javascript script. You need to write a javascript for this so that there wont be any post back.

Here is the sample code but you need to modify this according to your needs.

<script type="text/javascript">
function check()

function uncheck()

<input type="checkbox" id="myCheck" />
<input type="button" onclick="check()" value="Check Checkbox" />
<input type="button" onclick="uncheck()" value="Uncheck Checkbox" />

Hope this might help you out.

  #3 (permalink)  
Old July 9th, 2006, 10:40 AM
Posts: n/a

Thanks vitthala.

I forgot to mention, but I am referring to a checkboxlist server control.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Converting Client-side to Server-side Code kwilliams ASP.NET 2.0 Professional 1 November 21st, 2007 05:25 PM
check n uncheck items in checkboxlist in datalist moorejkrkumar ASP.NET 1.0 and 1.1 Basics 1 April 17th, 2007 01:39 PM
How to check installables in client side agnihotrived ASP.NET 2.0 Professional 1 November 8th, 2005 02:41 AM
Firing server side events at client side codes mehdi62b ASP.NET 1.0 and 1.1 Basics 6 May 18th, 2005 09:11 AM
Check Existance of file at Client Side hrishimusale Classic ASP Basics 2 September 9th, 2003 03:50 AM

All times are GMT -4. The time now is 09:24 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.