Limiting "Presets", Pictures, Messages, etc.

Discussion in 'ASP .Net' started by sjsean, Jan 12, 2010.

  1. sjsean

    sjsean Guest

    In many sites I have come across a limit to how many pictures,
    favorite item of whatever, messages in a website mailbox one can
    upload or have for their account. Can someone point me to some
    articles on how this is accomplished. It seems wasteful to assign 10
    database records when someone signs up assuming they may never use
    them.

    Suggestions?

    Sean
    sjsean, Jan 12, 2010
    #1
    1. Advertising

  2. sjsean wrote:
    > In many sites I have come across a limit to how many pictures,
    > favorite item of whatever, messages in a website mailbox one can
    > upload or have for their account. Can someone point me to some
    > articles on how this is accomplished. It seems wasteful to assign 10
    > database records when someone signs up assuming they may never use
    > them.


    You could simply check if the limit's been reached when you try you try to
    add another item...

    sub userAddItem(thing)
    if countOfItems(currentUser) < someLimit
    addItem(thing)
    else
    alertUserToProblem()
    end if
    end sub

    or disable the ability to add an item once the limit is reached.

    Andrew
    Andrew Morton, Jan 12, 2010
    #2
    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.
Similar Threads
  1. Robin Cull
    Replies:
    5
    Views:
    401
    Andrew Dalke
    Jul 31, 2003
  2. Daniel Joyce

    Python Audio (Alpy, Fastaudio, Etc Etc)

    Daniel Joyce, Sep 16, 2003, in forum: Python
    Replies:
    1
    Views:
    917
    Markus Wankus
    Sep 16, 2003
  3. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    384
    Fredrik Lundh
    Aug 13, 2008
  4. Martin Raychev
    Replies:
    1
    Views:
    279
    Alvin Bruney [MVP]
    Mar 2, 2004
  5. Markus Fischer
    Replies:
    4
    Views:
    511
    Josh Cheek
    Jun 15, 2011
Loading...

Share This Page