473,385 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to calculate total amount for multiple checkboxes in .net using C#

I am using checkbox list in my project,
[x]item1 250
[ ] item2 200
[x]item3 300
[ ] item4 250
[x]item5 300

so after checking ,the selected items should be redirected to another page with their cost and the total amount should be calculated over their. i am giving the cost in text box. i want this coding in .net framework using c#..

it should display,

item1 250
item3 300
item5 300
-------- ------
total 850

Is there any one to help me...its very urgent...THANKS IN ADVANCE....
Oct 2 '08 #1
4 5407
Plater
7,872 Expert 4TB
Uhh, Math101. You're asking us how to add numbers together. That is not only beginner coding, but beginner math.
Please go ahead and attempt the problem on your own. We won't do your work for you.
If you have any specific troubles, come back and reply to the post.

MODERATOR
Oct 2 '08 #2
Uhh, Math101. You're asking us how to add numbers together. That is not only beginner coding, but beginner math.
Please go ahead and attempt the problem on your own. We won't do your work for you.
If you have any specific troubles, come back and reply to the post.

MODERATOR
Sorry sir, I know its a basic calculation...but i want the calculation should be performed in the redirected page..experts should help the beginners..
Oct 3 '08 #3
Curtis Rutland
3,256 Expert 2GB
Experts should help beginners, yes, but we will not hand out code to you.

Here's how to get started. When you click the button or whatever to do the work, loop through your checkboxlist. If the item is checked, add it to a list or an array. After the loop, assign the array to a value in the Session object. On the redirected page, retrieve that Session object, loop through the array, and display and add your numbers.
Oct 3 '08 #4
Experts should help beginners, yes, but we will not hand out code to you.

Here's how to get started. When you click the button or whatever to do the work, loop through your checkboxlist. If the item is checked, add it to a list or an array. After the loop, assign the array to a value in the Session object. On the redirected page, retrieve that Session object, loop through the array, and display and add your numbers.

Thank You...now i understood what i want to do..now i'll work in it..once again thank you for your immediete response..THANK YOU bytes...
Oct 4 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Building Blocks | last post by:
Hi, All I need is a simle calculate form script which contains this: A script that can handle text input, radio buttons, checkboxes, and dropdowns. Each one of these variables will contain a...
4
by: James Greig | last post by:
hello people, i'm just learning javascript, could someone point me in the direction of an example of the following, or give me some clues as to how it might be done: what i would like to do...
7
by: Jurek | last post by:
I have 10+ experience in C/C++ - mostly automation and graphics. I have never written any business apps though. Recently I've been asked to write a simple report that would calculate sales...
2
by: foleyflint | last post by:
Hello, I'm trying to calculate the interest from a bankaccount which is displayed in a text file as followed: 9 2 345 3 3 300 etc. (there are 19 lines in total) the first number...
3
by: Tonij (with a J) | last post by:
Hi all, I have an Access 2003 database that has been a work in progress for a while, it's basically a system inventory and issue tracking system. Recently I have added a seperate area for...
1
by: Jassim Rahma | last post by:
here we have aa limited broadband internet accounts, 5GB, 10GB and 15GB. I want to calculate the total threshold to monitor the internet usage using C#?
9
by: Desyree | last post by:
I am putting together a database with the fields: 1. Number of Projects 2. Project (Name) 3. Project Contact 4. Company 5. Location (City, State) 6. Last Contact Date 7. Mw/g 8. Project Type
3
by: gator6688 | last post by:
I have to write a program that asks for a cost-per-item, number of items purchased, and a discount rate. Then it should calculate the total cost, tax due, and amount due. I have to use the...
4
by: bc070200263 | last post by:
This is an Islamic law that Muslims should pay their Zakat with the rate of 2.5%, means in Rs 100 they should pay Rs 2.5 as Zakat amount. Write a simple program which asks from the user The total...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.