TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mineten
NA
5
16.3k
C# Calculation and Adding a symbol
Nov 13 2014 6:55 AM
Hey guys...
This is how my form looks:
http://i.imgur.com/ZbSCQ0P.png
In my project, the items that I add with the prices in basket, add together, and I have the price for all of them together, displayed in the text box.
http://i.imgur.com/RyE6j08.png
What I want to do now, is writing a number into 'Payment Cash text box' and when I press 'Calculate Change button' I want the 'Total Price' number to be taken away from the 'Payment Cash' number and the number that is left, to be displayed in the 'Total Change text box'
Also if the number in 'Payment Cash text box' would be smaller than 'Total Price' I would like if the number displayed would show how much more money you need to pay.
For example:
The 'Total Price' is
£
100 and the 'Payment Cash' is
£
80, I would like the 'Total Change text box" to show -
£
20.
If that's not possible, then at least it would be nice, if a message would pop out, that says how much I need to pay more.
The last thing I want to ask, is how could I add the
'£' symbol into the prices.
string[] Men = new string[3];
string[] Women = new string[5];
string[] Children = new string[4];
double[] MenPrice = new double[3];
double[] WomenPrice = new double[5];
double[] ChildrenPrice = new double[4];
I used double[] for the prices, and for double[] I don't think I can use anything else than numbers.
Sorry for my bad English, and I will be really thankfull for any help.
Reply
Answers (
1
)
Sum of digits
populate dropdownlist with using jquery in mvc