List Box in ASP

List Box in ASP

Page 1 of 1

2 Replies - 5402 Views - Last Post: 28 June 2006 - 10:02 AM Rate Topic: -----

#1 phemmywales  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 04-May 06

List Box in ASP

Posted 04 May 2006 - 01:40 AM

hi, all. I am currently developing a ASP Web Application. iam faced with a challenge of Getting the Values of Items in a listbox(from a table) saved into another table.

e.g

ListA contains information about CrewMembers. the list allows multi-select. programm shud get all selected item and appendcertain parameter to them and save all into another table containing the Arrival information of the crew.

Pls help out
Is This A Good Question/Topic? 0
  • +

Replies To: List Box in ASP

#2 sigmazero13  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 10-May 06

Re: List Box in ASP

Posted 11 May 2006 - 09:03 AM

Is it getting the information from the listbox via a Submit, or are you trying to do it dynamically on-the-fly?

If you are submitting it, you'll need to make sure that the listbox is part of a form, and make sure the form is being submitted.

Then, you can just use something like Request.Form("ListA") or Request.QueryString("ListA") (depending on whether you used POST or GET to submit the form). The value returned will be a comma-separated list of values in the listbox; ie, every selection of the box will be in the list, separated by commas.

You can then do a Split or something to extract each individual element.

Is this what you are looking for?
Was This Post Helpful? 0
  • +
  • -

#3 taniyabanerjee  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 28-June 06

Re: List Box in ASP

Posted 28 June 2006 - 10:02 AM

View Postsigmazero13, on 11 May, 2006 - 07:55 AM, said:

Is it getting the information from the listbox via a Submit, or are you trying to do it dynamically on-the-fly?

If you are submitting it, you'll need to make sure that the listbox is part of a form, and make sure the form is being submitted.

Then, you can just use something like Request.Form("ListA") or Request.QueryString("ListA") (depending on whether you used POST or GET to submit the form). The value returned will be a comma-separated list of values in the listbox; ie, every selection of the box will be in the list, separated by commas.

You can then do a Split or something to extract each individual element.

Is this what you are looking for?

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1