---
title: "How do I get the value of the radio button?"  
description: "How do I get the value of the radio button?"  
author: "Anonymous User"  
published: 2013-12-17  
updated: 2013-12-17  
canonical: https://www.mindstick.com/forum/1783/how-do-i-get-the-value-of-the-radio-button  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How do I get the value of the radio button?

Here are my [options](https://www.mindstick.com/articles/43878/making-the-best-use-of-the-options-trade-ideas) (names) for the [radio button](https://www.mindstick.com/articles/12743/radio-button-in-android):

4

2

1

0.5

0.25

I tried using this but it's giving me an error:

multiplier = Convert.ToDouble(radioButton1.SelectedItem.ToString());

[Error Message](https://www.mindstick.com/forum/23174/error-message-the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configuration):

'System.Windows.Forms.RadioButton' does not contain a [definition](https://yourviews.mindstick.com/view/70598/false-furore-over-the-leadership-definition-statement-of-army-chief-bipin-rawat) for 'SelectedItem' and no [extension method](https://www.mindstick.com/articles/22/extension-method) 'SelectedItem' accepting a first argument of type 'System.Windows.Forms.RadioButton' could be found (are you [missing](https://answers.mindstick.com/qa/52138/international-missing-children-s-day-2019-was-observed-on) a using directive or an [assembly](https://www.mindstick.com/articles/25/global-assembly-cache) [reference](https://www.mindstick.com/forum/774/reference-what-does-this-error-mean-in-php)?)

How do I set the value of the multiplier based on what the user set in the radio button?

## Replies

### Reply by Pravesh Singh

Hi Chintoo,\

As said in the error [message](https://www.mindstick.com/forum/12802/show-confirmation-message-yes-or-no-in-asp-dot-net), RadioButton has no SelectedItem property. You should be getting the radiobutton text instead.

multiplier = Convert.ToDouble(radioButton1.Text);

If you want to check if the radiobutton is selected, use Checked property instead

```
if (radioButton1.Checked){    multiplier = Convert.ToDouble(radioButton1.Text);}In your case you could use a loopforeach (RadioButton d in this.Controls.OfType<RadioButton>()){    if (d.Checked)    {         multiplier = Convert.ToDouble(d.Text);    }}
```


---

Original Source: https://www.mindstick.com/forum/1783/how-do-i-get-the-value-of-the-radio-button

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
