Possible or not?

Results 1 to 2 of 2

Thread: Possible or not?

  1. #1
    Join Date
    Dec 1969

    Default Possible or not?

    Hey again all,<BR><BR>Cheers for that link Aku - exactly what i&#039d been looking for =)<BR>Before I get really stuck in I wanted to make sure that my aim is actually possible via ASPs.<BR><BR>Ok essentially I need to know if the following would be possible using ASPs because using SQL IDC/HTXs i&#039ve come to a complete halt - basically double use of _a_ variable which it won&#039t allow - hence time to learn ASPs =)<BR><BR>Page 1 - User selects a Team (drop-down) and enters the Date (textbox)[ddmmyyyy]. Presses submit.<BR><BR>Page 2 - The database is then queried and then displays a complete listing of all people within that team [fixed info] (each in a new column). It also displays the date [fixed info]. The user then needs to make a selection from 4 options via a drop-down list. There is also an optional comments box. Lastly there is a submit button for _each_ column. When sumbit is pressed all the information on that page is passed through to the database table "Register" where a new record is added.<BR><BR>Problem - I need to be using only ONE submit button - not one for each person. So that all the information entered on that page is sumbitted to the database in one go.<BR><BR>Sound feasible using ASPs? I hope so =)<BR><BR>Cheers,<BR><BR>Justin

  2. #2
    Shawn Clabough Guest

    Default RE: Possible or not?

    Yes, it&#039s possible. Have the ASP add a record ID to the control name, then loop through the control names on the next page and extract the information you need.<BR><BR>Assuming Player is a unique ID:<BR><BR>&#060;select name="Selection&#060;%=rs.Fields("Player")%&#062;" &#062;<BR> &#060;option value="1"&#062;One&#060;/option&#062;<BR> &#060;option value="2"&#062;Two&#060;/option&#062;<BR> &#060;option value="3"&#062;Three&#060;/option&#062;<BR> &#060;option value="4"&#062;Four&#060;/option&#062;<BR>&#060;/select&#062;<BR><BR>On the following ASP page use something like this to extract the IDs the form variables refer to:<BR><BR>For Each Key in Request.Form<BR> If Left(Key,9) = "Selection" then<BR> PlayerID = Right(Key, Len(Key) - 9)<BR> SelectedValue = Request.Form(Key)<BR> End If<BR>Next<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts