473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How Selected value in combobox return string

string st=combobox1.selectedvale.tostring();
combo box return 2 item ,
1:text
2:value
the value of combo not type of(int),the value type (string)
how value ofcombobox return data with type(string)?
May 29 '13 #1
2 8108
Oralloy
988 Expert 512MB
mahla shahrabi,

Your question is a bit unclear, but as I read it - I would say that the toString() method you use in the first line is taking care of the conversion for you.

That said, what are you actually trying to achieve here?

Kind Regards,
Oralloy
May 29 '13 #2
Hello Mahla.

Your question is not clear.
But you want to return combobox Text , It's better write this code in SelectedIndexChanged event:
Expand|Select|Wrap|Line Numbers
  1. MessageBox.Show(comboBox1.SelectedItem.ToString());
this return texts that you set to Items in combobox property.

Good Luck.
May 29 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Brian Henry | last post by:
say I have a databound combo box, which allows for text entry still (DropDownStype = DropDown in this case). now, If the user doesn't enter manually an item in the data bound list, nothing...
18
by: Ed Jay | last post by:
<disclaimer>js newbie</disclaimer> My page has a form comprised of several radio buttons. I want to poll the buttons to determine which button was selected and convert its value to a string. I...
0
by: Luqman | last post by:
My combobox is bound to sqldatasource, what I want is, when I change the combobox selected value, the sql datasource should be positioned to that value, so that all textboxes bound to that sql data...
0
by: Kysonel | last post by:
Hello ! I have been trying to use the datagridComboColumnStyle that was decribed in this thread : ...
1
by: julianomartins | last post by:
Hi friends, how I make to recoup the value of database and to keep selected in combobox to edit my form? in script below it is selected field of the table that possesss id of the first item of...
4
by: hhak | last post by:
Hi all, Im pretty new to C#, im trying to assign a combobox selected value to a int variable. int number; combobox has items added (1,2,3,4,...9) when i select a number from the combobox i...
6
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
1
by: Joel1334 | last post by:
Hi! How can I change forecolor of a selected value in combobox? when I select a value in a combobox and press a button to "activate" what I've selected I want the text to be green and then...
3
by: Rania Hassan | last post by:
I created JSP page containing a form with two comboboxes, how can I get the selected value from the first combobox to pass it to SQL statement used by the second combobox? here is my code with...
0
by: visweswaran2830 | last post by:
Hi, I am having datagridview in that I have datagridview combobox column and noraml textfield. I want to know that how can I load selected value in that combox box when I am loading all entered...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.