Update Scoreboard - ASP

Discussion in 'C#' started by cancer10, Oct 24, 2006.

  1. #1
    Hello,

    I am facing a problem in ASP. The scenario is...

    I have a database with the following Colums and the data type of all Colums are integer

    id|score1 | score2 | score3
    ------------------------------------
    1 | 10 | 4 | 10 |
    2 | 5 | 51 | 10 |
    3 | 5 | 22 | 10 |
    4 | 15 | 54 | 10 |
    5 | 7 | 11 | 10 |
    6 | 19 | 2 | 10 |
    7 | 10 | 1 | 10 |
    8 | 12 | 66 | 10 |
    9 | 3 | 75 | 10 |
    10| 7 | 11 | 10 |



    Now, I have a page (search_result.asp) where I can search for scores based on the ids, and each result has a corresponding checkbox (so that I can increase the number of score of a particular ID or multiple IDs )

    I have a second page (update_scrore.asp) where I have 3 textboxes where I can enter scores and at the click of a button these scores are added to the selected ID.

    I can make it work perfectly fine when It comes to just one score update at a time. But I cannot figure out how to add the score if I am selecting multiple checkboxes i.e. multiple IDs.

    For Eg. If I am selecting the checkbox containing the ID 8, and I want to add 30 scores in each 3 colums, the updated value will be 42 | 96 | 40

    But I cannot figure out, how should I add and update the colums If I am selecting multiple IDs i.e. 7, 5, 9


    I am new to ASP, so please help.


    Thanx in Advance....


    God Bless
     
    cancer10, Oct 24, 2006 IP
  2. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #2
    well you could check and see if the number parameter is not empty, so if lets say an input with a name id8 is not empty then add it if it is empty don't add it,

    place the code so that it'll be easier for us
     
    ludwig, Oct 24, 2006 IP
  3. cancer10

    cancer10 Guest

    Messages:
    364
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanx mate that helped
     
    cancer10, Oct 27, 2006 IP
  4. weirdwes

    weirdwes Peon

    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Can you post a sample of the search results page so I can see how your checkboxes are set up?
     
    weirdwes, Oct 29, 2006 IP
  5. ludwig

    ludwig Notable Member

    Messages:
    2,253
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    225
    #5
    READ THE PREVIOUS POSTS. HE GOT WHAT HE NEEDED and you don't have to reply with stupid feedbacks
     
    ludwig, Oct 29, 2006 IP