Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey Guys,

Need your amazing help ;)

I have an entry page with a number of dropdownlists & textboxes.

I want to be able to select a value from the dropdownlist DepreciationRate e.g 0.5% then enter a Cost price into a Cost Textbox, when i do this, I would like to be able to do a quick calculation and place the answer into another empty text box called Total Depreciation.

I've tried sending the selected value from DepreciationRate DDL to a textbox, then do a calculation from a hidden textbox with that choice and the Cost textbox but it doesn't work.

Here's what I mean...

http://i1145.photobucket.com/albums/o506/MConnolly1991/Capture-1.png?t=1343123479[^]

My dropdownlists are bound to a database also.

Thanks guys! Appreciate your help.
Posted
Comments
bbirajdar 24-Jul-12 6:04am    
You need to use client side javascript..
EuphorialXTC 24-Jul-12 6:23am    
Ok thanks, will look into it. Never used it before!

1 solution

 
Share this answer
 
Comments
EuphorialXTC 24-Jul-12 6:23am    
Thanks Amit, will look into them now and let you know if they help!
EuphorialXTC 24-Jul-12 7:30am    
I can't really make sense of how it works as I'm new to C# & ASP. I use onchange instead of onblur, because I have javascript validation implied. I'll post my code below!

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900