Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 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
  #1 (permalink)  
Old November 27th, 2003, 09:37 PM
Registered User
Join Date: Nov 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to g_tan
Default how to get the value of a listbox in asp

how do i get the value of Mon into a asp/vb variable day..?

my current code doesnt seem to work
<select id="day" name="day">
        <Option value="Mon">Monday</Option>
        <Option value="Tue">Tuesday</Option>
        <Option value="Wed">Wednesday</Option>
        <Option value="Thu">Thursday</Option>
        <Option value="Fri">Friday</Option>
        <Option value="Sat">Saturday</Option>

        <select id="time" name="time">
        <option value="0800">8 am</option>
        <option value="0900">9 am</option>
        <option value="1000">10 am</option>
        <option value="1100">11 am</option>
        <option value="1200">12 pm</option>
        <option value="1300">1 pm</option>
        <option value="1400">2 pm</option>
        <option value="1500">3 pm</option>
        <option value="1600">4 pm</option>
        <option value="1700">5 pm</option>

        <p>Staff Name:
        <input name="name" size="10"/>

        Dim day,time,name

  #2 (permalink)  
Old November 28th, 2003, 03:51 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

You shouldn't use value in the name of the QueryString element:

time = Request.QueryString("time")

should work.



Imar Spaanjaars
Everyone is unique, except for me.

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I set TextBox value from asp.net Listbox, vishnu108mishra ASP.NET 2.0 Professional 1 March 10th, 2008 06:11 AM
SOS!How to realize multi-column asp.net ListBox? xewei VS.NET 2002/2003 2 June 3rd, 2007 09:24 PM
how to add scroll bars in asp.net listbox control DARSIN General .NET 3 January 26th, 2006 11:39 PM
selected items in asp:ListBox jtyson Classic ASP Basics 2 July 2nd, 2004 12:01 AM

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