Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I make a TextBox mirror the top item in a DropDownList when a button click occurs?

Posted on 2007-04-04
2
Medium Priority
?
304 Views
Last Modified: 2008-03-10
(I have an ASP.net 1.1 application with VB.net coding and VBscripting)

I have a DropDownList box called 'DropDownList1' that is populated with a single value when a button is clicked. How can I make a TextBox mirror this top item in the drop down list when the button click occurs?

0
Comment
Question by:jazjef
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 19

Accepted Solution

by:
DreamMaster earned 2000 total points
ID: 18848977
Ok, you are not making complete sense to me...

Are you populating a dropdownlist with just one value? (which is what your question reads like) or are you automatically selecting the correct value in the dropdownlist upon the button click?

If the last option is your scenario, you could try to do the following after you set the value of the dropdownlist

txtMirror.Text = DropDownList1.SelectedValue

or..if the value is numeric and you are using the Text property of the options..

txtMirror.Text = DropDownList1.SelectedText

Regards,
Max.
0
 
LVL 19

Expert Comment

by:DreamMaster
ID: 18857300
Glad to have been helpful :)

Regards,
Max.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

688 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