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
302 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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

630 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