![]() |
|
|
|||||||
![]() |
ASP Net - Q: go though a dropwdownlis items |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hello
I have TextBox1 and TextBox2 and Button1 and Button2. I also have DropDownList1. Now, when I click Button1 I want to concatenate “TextBox1 - TextBox2” and add this item to DropDownList1. If I have clicked Button2 I can to go though DropDownList1 and see what items are there. Can anyone write me C# code for this. I am quite new in ASP.Net environment. Thanks, =?Utf-8?B?SklNLkgu?= |
|
|
|
|
#2 |
|
Posts: n/a
|
Hi Jim,
1. Add item ddl: DropDownList1.Items.Add(TextBox1.Text + " - " + TextBox2.Text); 2. Loop thru ddl: foreach (ListItem item in DropDownList1.Items) { string txt = item.Text; } HTH Elton Wang "JIM.H." wrote: > Hello > > I have TextBox1 and TextBox2 and Button1 and Button2. I also have > DropDownList1. > Now, when I click Button1 I want to concatenate “TextBox1 - TextBox2” and > add this item to DropDownList1. > If I have clicked Button2 I can to go though DropDownList1 and see what > items are there. > > Can anyone write me C# code for this. I am quite new in ASP.Net environment. > Thanks, > =?Utf-8?B?RWx0b24gVw==?= |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ASP.Net ListBox items highlited | Catherine Murashchyk | Software | 0 | 02-01-2008 08:24 PM |
| Memorabilia rare items The Carpenters Karen Carpenter | JJP | DVD Video | 1 | 11-20-2007 01:13 PM |
| Done After 9 Years of Selling on EBay | gojody | DVD Video | 5 | 03-27-2007 04:17 PM |
| ONLINE STORE FOR SALE..PRE-STOCKED w/ 3500 BRAND NAME ITEMS..$39.95 | wholesale | DVD Video | 1 | 09-26-2006 03:55 AM |
| AUCTION: Many Rare Items - incl. DVDs. NO RESERVES! All End Soon! | UniqueGuyinPgh | DVD Video | 0 | 08-07-2003 11:57 PM |