?
Solved

Storing the value from ComboBox in .NET

Posted on 2005-04-11
7
Medium Priority
?
171 Views
Last Modified: 2010-04-23
I have a windows form that accepts the value from the textbox and dropdown list.When the User presses Submit button, I want the values to be displayed...something like

" you have enetered the User Id to be ...... and the access level to be ......where User Id and the Access level are entered by the user.Can some help me with the code showing how to store these values and display them on the screen.Thaks for your help.

Thanks

0
Comment
Question by:g46905
  • 4
  • 3
7 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 500 total points
ID: 13752685
Private Sub submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submit1.Click

msgbox(" you have entered the User Id to be " & textbox1.text & " and the access level to be " & combobox1.selectedtext)
    End Sub
0
 

Author Comment

by:g46905
ID: 13752814
The Text entered in the TextBox is being diplayed as expected, but the selection from the dropdown box is not being displayed.

ComboBox1.Items.Add("User")
        ComboBox1.Items.Add("QA Verify")
        ComboBox1.Items.Add("GateKeeper")
        ComboBox1.Items.Add("Administrator")
        ComboBox1.SelectedIndex = 0

Can you tell me the reason why?

Thanks,




0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 13752875
sorry use

ComboBox1.SelectedItem
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:g46905
ID: 13752945
That works fine.Will i be able to highlight ( bold )the the text being displayed ?

thanks
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 13752967
You mean in the messagebox ?
0
 

Author Comment

by:g46905
ID: 13752992
Yes sir
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 13753061
No you won't the messagebox doesn't expose it, If you want to do that you will have to create a small form yourself
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question