Solved

How to Parse Checkbox Input Type Value to String

Posted on 2013-01-08
1
562 Views
Last Modified: 2013-01-23
I currently have this functionality in place for a decimal value, but I also need it for a checkbox. Below is what I have in place for the decimal value, how can I replicate this for my check box value?

if (decimal.TryParse(txtGift.Value.ToString().Replace("$", ""), out number))//93
            {
                addItemToCart("Gift of ", number);
                addDonations(number, 93);
                addOnTotal = addOnTotal + number;
            } 

Open in new window

0
Comment
Question by:is_staff
1 Comment
 
LVL 29

Accepted Solution

by:
anarki_jimbel earned 500 total points
ID: 38757374
For a check box - it's either checked or not. What do you want to parse?
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now