Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 4th, 2007, 02:06 PM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default Drop Down List Code Query

Hi,

Within asp.net 1.1 and vb.net I've got a page containing a dropdwon list control as per the code below :

Code:
<asp:DropDownList id="Product" runat="server">
  <asp:ListItem Value="GuitarCables">Guitar Cables</asp:ListItem>
  <asp:ListItem Value="Plectrums">Plectrums</asp:ListItem>
  <asp:ListItem Value="GuitarCases">Guitar Cases</asp:ListItem>
  <asp:ListItem Value="GuitarStraps">Guitar Straps</asp:ListItem>
  <asp:ListItem Value="GuitarTuners">Guitar Tuners</asp:ListItem>
  <asp:ListItem Value="GuitarStrings">Guitar Strings</asp:ListItem>
  <asp:ListItem Value="GuitarStands">Guitar Stands</asp:ListItem>
</asp:DropDownList>
Now what I want to do is to create a label to dsiplay what item is being selected. For example, if a customer clicks on the "Guitar Cables" option it writes out the label saying "You have selected Guitar Cables".

What's the easiest way to do this ?

Thanks,


  #2 (permalink)  
Old July 4th, 2007, 02:22 PM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Pls ignore - I've fixed it now thanks just used :

                    lblSearchItem.Text = "You have selected " + Product.SelectedItem.Value


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a drop down list in a query carbon052 Access 3 March 19th, 2008 11:53 AM
Access: Drop down list in query newtoaccess Access 1 February 28th, 2006 08:30 AM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Drop Down List Beginner123 VB How-To 2 March 7th, 2005 01:56 PM
Drop Down List mrideout BOOK: Beginning ASP.NET 1.0 8 September 16th, 2004 07:11 AM



All times are GMT -4. The time now is 09:14 AM.


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