Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 22nd, 2007, 10:55 PM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default adding dropdownlist item to a textbox


      I want to add a selected dropdownlist item to a to a textbox. when the item is selected from the dropdownlist it will be shown in a textbox. The dropdownlist items are added from a database. It is on a webform and using C#. I have added OnSelectedIndexChanged attribute in dropdownlist.
      plz help me.
 
Old May 23rd, 2007, 12:35 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

postback..
and use this code
txtMyTextBox.Text = ddlMyDropDownList.SelectedText;


Nothing is impossible. The impossible only takes longer. "Digital Fortress, Dan Brown"
 
Old May 24th, 2007, 01:14 AM
Registered User
 
Join Date: May 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanx the problem is solved.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting DropDownList Item yes_no ASP.NET 1.0 and 1.1 Professional 1 April 8th, 2008 08:00 AM
How to set selected item in Dropdownlist? MTLedari ASP.NET 2.0 Basics 4 December 27th, 2006 12:53 AM
preselecting dropdownlist item yasminnnnn ASP.NET 2.0 Professional 1 December 26th, 2006 06:52 AM
How can i change the textbox into a dropdownlist saif44 ASP.NET 2.0 Basics 1 March 5th, 2006 04:20 PM
Adding List Item Programmatically rit01 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 February 12th, 2006 04:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.