AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 The selected Item(ADD) Of Drop down box should add values and display it in a Text box
Posted by Jeyalakshmi>p on  7/10/2009 1:32:14 AM Category: VB.NET
Add to my favorites
Email to friend
hi,
hw to write code for the following
The selected Item(ADD) Of Drop down box should add values and display it in a Text box

Post Your Reply Post New Question

 Viewer's Reply
Write in the Selected Index Changed Event
Answered By Moderator1 on 7/10/2009 8:32:09 PM
In the SelectedIndex Changed event of the dropdown control, you need to write code.

The Textbox control cannot hold any values expect text.

So, to display the Text of the Dropdown control, use the below code,

TextBox1.Text = DropDownList1.SelectedItem.Text;

To display the value of the DropDown control, use the below code,
TextBox1.Text = DropDownList1.SelectedValue;
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
FierceDeveloper
Programmers Heaven C# School Book - Free 338 Page eBook
Many .NET teams are underperforming, is yours?