Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Actually i am binding the integer values and string values to combobox valuefield. now in cs page i want to find in button send event. if it is integer means i have to execute one code and if it is string means i have to execute another code....is it possible...
Posted

 
Share this answer
 
Try:
C#
if (MyComboBox.SelectedItem is string)
   {
   ...
   }
 
Share this answer
 
C#
int s;
        if (int.TryParse(MyComboBox.Text, out s))
            //if number
        else
            //if string
 
Share this answer
 
Comments
ntitish 4-Jul-13 2:49am    
thanks sir.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900