---
title: "Get combobox set value as string"  
description: "Get combobox set value as string"  
author: "Samuel Fernandes"  
published: 2014-02-09  
updated: 2014-02-09  
canonical: https://www.mindstick.com/forum/1965/get-combobox-set-value-as-string  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Get combobox set value as string

Found several ways to do so, but none of them [works for me](https://answers.mindstick.com/qa/110735/how-do-i-create-a-study-schedule-that-works-for-me).. I have a [combobox](https://www.mindstick.com/articles/57/display-record-according-to-combobox-selection-in-csharp-dot-net) with [variable](https://www.mindstick.com/articles/1807/objective-c-data-types-variables-object-creation) number of [options](https://www.mindstick.com/articles/43878/making-the-best-use-of-the-options-trade-ideas) (taken from [dynamic](https://www.mindstick.com/blog/11080/features-of-java-dynamic-complied-and-interpreted) xml [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp)). For next, I need to know what the [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) choosed, and I cant find out how to do it. This is one of ways I found and tried:

[string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) myString = myCombobox.SelectedValue.ToString();

At [least](https://yourviews.mindstick.com/story/1471/5-autobiographies-you-should-read-at-least-once) I dont get an [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing), but when I try to show that string, it does nothing.

## Replies

### Reply by Pravesh Singh

Hi Samuel,\
Try this:\

string myString = ((ComboBoxItem)myCombobox.SelectedItem).Content.ToString();


---

Original Source: https://www.mindstick.com/forum/1965/get-combobox-set-value-as-string

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
