.net - Store the text value in a radio button in a decimal variable using Visual Studio 2012, c# -


I currently have 3 radio buttons in 3 groups, and I just want to drag the text value into the currently checked radio button Need for each group and store it in decimal value. Any ideas?

My current code:

  Public Partial Sections Form 1: Form {Public Form 1 () {Initial Group (); } Private Zero Form1_Load (Object Sender, EventArgs e) {} Private Zero label4_Click (Object Sender, EventArgs e) Private Zero radioButton1_CheckedChanged (Object Sender, EventArgs e) {} Private Zero btnCalculate_Click (Object Sender, EventArgs e) {Decimal loanAmount ; Decimal interest rate; Int 16 Number of Payments; Decimal monthly payment; // Create web service object ISULoanLeaseCalculatorService myCalcWS = new ISULoanLeaseCalculatorService (); monthlyPayment = (decimal) myCalcWS.LoanMonthlyPayment (Convert.ToDouble (loanAmount), Convert.ToDouble (interestRate), Convert.ToDouble (numberOfPayments)); }}    

After

You can react when the event is clicked whenever a button is clicked.

Then grab the text associated with the button from the property and try to parse it:

  decimal myDecimalValue; Bull success = decimal Tri Force (RB Text, My Decimals Value Out); ShowSomeErrorMessage (! Success);    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -