Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > BOOK: Beginning ASP 3.0
Password Reminder
Register
| FAQ | Members List | Calendar | 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 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 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>

        <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>
        </select>



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

<%
        Dim day,time,name
        name=request.querystring("name")
        day=request.querystring("dayvalue")
        time=request.querystring("timevalue")




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

Hi there,

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

time = Request.QueryString("time")

should work.

HtH,

Imar



---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 


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



All times are GMT -4. The time now is 12:53 PM.


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