473,326 Members | 1,972 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,326 software developers and data experts.

how to combine dropdown and assing to a string

hi,
I have 3 dropdownlist for displaying the day,month and year.
I need combine those dropdown's selected items .
so,i need the answer to
1.how to combine the those 3 values
2.how to assign to a string
Aug 5 '10 #1
1 886
Christian Binder
218 Expert 100+
You can take use of ComboBox' member SelectedText or you use SelectedItem.ToString() to get a string.
After that you can concatenate these strings with a plus-sign.
E.g.
Expand|Select|Wrap|Line Numbers
  1. string s1 = comboBox1.SelectedText;
  2. //or string s1 = comboBox1.SelectedItem.ToString();
  3. string s2 = comboBox2.SelectedText;
  4. string result = s1 + s2; // or s1 + " " + s2
  5.  
Aug 5 '10 #2

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

Similar topics

2
by: Daniel Alexandre | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there, I'm using the following method in my program to check whether a message received is printable or not and to strip the non-printable...
7
by: Steven Bethard | last post by:
How do I make sure that my entire string was parsed when I call a pyparsing element's parseString method? Here's a dramatically simplified version of my problem: py> import pyparsing as pp py>...
1
by: William Stacey [MVP] | last post by:
I need a bullet proof way to combine a root and a relative path to form a FQ rooted path (similar to a VDir in IIS). Path.Combine alone will not do the job in all cases. I also need to be sure...
3
by: JIM.H. | last post by:
Hello, I am suing SELECT * from MyTable in a stored procedure and populate dropdown list. By using followings: ddlSP.DataSource = DS; ddlSP.DataTextField = "PName"; ddlSP.DataValueField = "PID";...
3
by: CSharpguy | last post by:
I'm trying to populate a drop down with dates from a data field in my data base but I want the format like MM/dd/yyyy instead of 1/1/2006 12:00 PM How can I my date to show as 1/1/2006? I'm...
13
by: bwaichu | last post by:
Now, I read the faq, and it suggests using sprintf. However, I want to all ways know where the integer finishes in the string. Basically, I want to: nbr | other data But the other data all...
8
by: arnuld | last post by:
i tried to output these 2 to the std. output: const std::string hello = "Hello"; const std::string message = hello + ", world" + "!"; const std::string exclam = "!"; const std::string...
0
by: temp304 | last post by:
Customize Dropdown Menu is designed to display some choices, as: languages, countries, themes,... but it's differrent from original version in browsers. This tool combine CSS and JavaScript to create...
6
by: fran7 | last post by:
Hi, Would anyone know how to populate an asp dropdown with a dependant condition. I need this dropdown to select only artists, ie from the authortwo field where in another field, ie extrathree, ...
5
by: Janice Hui | last post by:
Hi, I have two strings as below: string a = "A, 0001; B, 0002; C, 0003;"; string b = "0001, From, FlowA; 0002, To, FlowB; 0003, From, FlowC; 0003, To, FlowD;"; I would like to produce a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.