Wrox Programmer Forums
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 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 July 4th, 2007, 02:06 PM
Authorized User
Join Date: Sep 2006
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts
Default Drop Down List Code Query


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

<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>
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 ?


Old July 4th, 2007, 02:22 PM
Authorized User
Join Date: Sep 2006
Posts: 82
Thanks: 0
Thanked 0 Times in 0 Posts

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

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

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

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