How do I fix "Argument not specified for parameter 'value' of 'Public Overridable Sub Add(key As Obj

Discussion in 'ASP .Net Web Controls' started by Chuck Insight, Mar 18, 2005.

  1. I am way over my head with this one - Here is the code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html><head><script runat = 'server'>
    Public Overridable Sub Add(key As Object, value As Object)
    dim balls as hashtable = new hashtable
    randomize
    dim ball as integer = int(rnd * 48) + 1
    dim i as integer
    for i = 1 to 300
    on error resume next
    dim sample as arraylist = new arraylist
    dim s as integer
    for s = 1 to 48
    s += 1
    sample.add(s)
    next s
    if ball = 1 and sample.contains(ball) then
    balls.add(ball)
    sample.remove(1)
    goto end
    endif
    end:
    Next i
    end sub</script></head><body></body></html>
     
    Chuck Insight, Mar 18, 2005
    #1
    1. Advertising

  2. It sounds like the problem is that you aren't passing both parameters when
    you're calling this method.
    It requires two parameters, a Key and a Value.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "Chuck Insight" <> wrote in message
    news:WyA_d.80698$r55.13694@attbi_s52...
    >I am way over my head with this one - Here is the code:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    > <html><head><script runat = 'server'>
    > Public Overridable Sub Add(key As Object, value As Object)
    > dim balls as hashtable = new hashtable
    > randomize
    > dim ball as integer = int(rnd * 48) + 1
    > dim i as integer
    > for i = 1 to 300
    > on error resume next
    > dim sample as arraylist = new arraylist
    > dim s as integer
    > for s = 1 to 48
    > s += 1
    > sample.add(s)
    > next s
    > if ball = 1 and sample.contains(ball) then
    > balls.add(ball)
    > sample.remove(1)
    > goto end
    > endif
    > end:
    > Next i
    > end sub</script></head><body></body></html>
    >
    >
     
    Steve C. Orr [MVP, MCSD], Mar 18, 2005
    #2
    1. Advertising

  3. Thanks Steve - I'll give it a try and let you know how it goes.

    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > It sounds like the problem is that you aren't passing both parameters when
    > you're calling this method.
    > It requires two parameters, a Key and a Value.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    > "Chuck Insight" <> wrote in message
    > news:WyA_d.80698$r55.13694@attbi_s52...
    > >I am way over my head with this one - Here is the code:
    > >
    > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    > > <html><head><script runat = 'server'>
    > > Public Overridable Sub Add(key As Object, value As Object)
    > > dim balls as hashtable = new hashtable
    > > randomize
    > > dim ball as integer = int(rnd * 48) + 1
    > > dim i as integer
    > > for i = 1 to 300
    > > on error resume next
    > > dim sample as arraylist = new arraylist
    > > dim s as integer
    > > for s = 1 to 48
    > > s += 1
    > > sample.add(s)
    > > next s
    > > if ball = 1 and sample.contains(ball) then
    > > balls.add(ball)
    > > sample.remove(1)
    > > goto end
    > > endif
    > > end:
    > > Next i
    > > end sub</script></head><body></body></html>
    > >
    > >

    >
    >
     
    Chuck Insight, Mar 19, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page