Click here to Skip to main content
12,754,090 members (27,690 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET Chart
I am currently working on an page that I want the users to check some checkboxes and as the users check the check boxes I would like a pie chart that would update on a button click. For example..

if (checkbox1.checked = true)
 piechart1 = 10%;

i'm sure that this is not how this is done but just so you get the idea.

I am pretty new to both charts and so any help is appreciated. Thanks!
Posted 21-Feb-13 14:25pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Can I unsee it?! :-)

Suppose you wanted to say if (checkbox1.checked == true) { /* ... */ } and mixed up '==' (check for equality) with '=' (assignment) and lost the upper-case in "Checked" ("checked" would not compile). It happens. But isn't it obvious that if (checkbox1.checked == true) { /* ... */ } should be if (checkbox1.Checked) { /* ... */ }, because CheckBox.Checked is already Boolean; there is no need to compare it the true?

This is not even a bug. This is the indication of what you are doing, programming, or just wasting your time.

It cannot be the idea of anything. Listen to a good advice: stop working with charts or anything, stop ASP.NET development or whatever else you are doing. You can use your time much better. Learn programming, from the very beginning: types and instances, variables and members, operators; do simple exercises, better with simple console-only application. This is what you really need right now. ASP.NET, graphics, UI — it all needs OOP, but you are not even close. Don't rush, because, right now, doing all that, you will stay frustrated, won't go anywhere. Until you learn the very basics.


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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 21 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100