Best method to redirect randomly at 10:1

Discussion in 'ASP .Net' started by Grant Merwitz, Jul 15, 2005.

  1. Hi

    We are conducting a test with our website.
    We are going to redirect every 1 in 10 visitors to a new default homepage to
    determine the effectiveness of this page.

    I'm looking for ideas on how to do this.

    1 thought i've already had:

    Everytime a visitor comes to the site, i can hold an application
    variable with a number in it, and increment it by 1.
    When that gets to 10, i can send that user to the test default page, and
    reset the app variable back to one.

    Any other ideas, or better methods.
    Or even problems with this potential method.

    Thanks for any help on this
    Grant Merwitz, Jul 15, 2005
    #1
    1. Advertising

  2. Grant Merwitz

    Scott Allen Guest

    Hi Grant:

    You can roll the dice with the Random class. The Next method will give
    you a random number, inside of a range if you wish. Based on this
    number you could decide if you want to redirect. This approach would
    be more random than redirecting every 10th request.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/



    On Fri, 15 Jul 2005 16:00:09 +0100, "Grant Merwitz"
    <> wrote:

    >Hi
    >
    >We are conducting a test with our website.
    >We are going to redirect every 1 in 10 visitors to a new default homepage to
    >determine the effectiveness of this page.
    >
    >I'm looking for ideas on how to do this.
    >
    >1 thought i've already had:
    >
    > Everytime a visitor comes to the site, i can hold an application
    >variable with a number in it, and increment it by 1.
    > When that gets to 10, i can send that user to the test default page, and
    >reset the app variable back to one.
    >
    >Any other ideas, or better methods.
    >Or even problems with this potential method.
    >
    >Thanks for any help on this
    >
    Scott Allen, Jul 15, 2005
    #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. =?Utf-8?B?VHJveQ==?=

    Response.redirect does not redirect from .aspx page

    =?Utf-8?B?VHJveQ==?=, Oct 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,233
    Srowe1975
    Oct 15, 2008
  2. R.A.M.
    Replies:
    1
    Views:
    1,462
    Jeff Dillon
    May 4, 2006
  3. Anand
    Replies:
    5
    Views:
    497
    Alex Hunsley
    Mar 10, 2007
  4. Anand
    Replies:
    1
    Views:
    373
    Eric Sosman
    Mar 9, 2007
  5. Sal
    Replies:
    1
    Views:
    403
Loading...

Share This Page