Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 14th, 2007, 12:21 PM
Friend of Wrox
Join Date: Aug 2006
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listbox

Hi All

In my application, i have a listbox and a checkbox

What i am doing is, when the chekbox is cheked, all items in listbox are selected.

When unchecked, all items are deselcted.

Upto this, it s workng..

But now, suppose the checkbox is checked, and all the itms are selected, the user selects a particlar item from the listbox, all the other items get deselected.

But the checkbox remains checked.

I am confused how to make the checkbox unchecked, when any itmes in the listbox are selected??
I read that i can write javascript on listbox clcik event, but i dont know javascript. if someone can help in this it will reallly gretaful

Hope someone can suggest any ways to accomplish this


Old May 14th, 2007, 12:24 PM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

Javascript is the way to go as its pointless to make another round trip to the server in this case. A simple google search on forms validation should get you the code you need.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
================================================== =========
Why can't Programmers, program??
================================================== =========
Old May 15th, 2007, 02:09 PM
Friend of Wrox
Join Date: Aug 2006
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts

Thank you

Similar Threads
Thread Thread Starter Forum Replies Last Post
ListBox obrienkev C# 2005 4 November 6th, 2007 03:15 AM
multiple Listbox values in another listbox terryv Excel VBA 0 June 27th, 2007 07:01 AM
ListBox kanoorani Beginning VB 6 4 September 12th, 2006 12:28 PM
About listbox csc820203 C# 1 April 29th, 2004 06:17 AM
I'm back :) Listbox var from listbox MichaelTJ .NET Web Services 2 October 21st, 2003 07:06 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.