27028 total geeks with 3522 solutions
Recent challengers:
 Welcome, you are an anonymous user! [register] [login] Get a yourname@osix.net email address 

Articles

GEEK

User's box
Username:
Password:

Forgot password?
New account

Shoutbox
timsattemme
<strong><a href="http:/ /www.myvidu. com/">Links London Discount</a> </strong> | <strong><a href="http:/ /www.myvidu. com/">links of london silver</a></ strong> | <strong><a href="http:/ /www.myvidu. com/">Links of London Sale Online</a></ strong> <br> <title>
timsattemme
[b][url=http ://www.repli cawatcheslov e.com/]omega wa<strong><a href="http:/ /www.replica watcheslove. com/">omega watches on sale</a></st rong> <br> <strong><a href="http:/ /www.replica watcheslove. com/">omega watches replica</a>< /strong> <br >
timsattemme
<strong><a href="http:/ /www.replica watcheslove. com/">best omega watches replica</a>< /strong> <br > <strong><a href="http:/ /www.replica watcheslove. com/">watche s</a></stron g> <br> <strong><a href="http:/ /www.replica watcheslove. com/">watch< /a></strong> <br> <
timsattemme
[b][url=http ://www.dalla sbead.org/]p andora jew<strong>< a href="http:/ /www.dallasb ead.org/">pa ndora jewelry wholesale</a ></strong> < br> <strong><a href="http:/ /www.dallasb ead.org/">pa ndora jewelry cheap</a></s trong> <br>
timsattemme
<strong><a href="http:/ /www.xnxx80. org/">swiss Mechanical movement replica watches</a>< /strong> | <strong><a href="http:/ /www.xnxx80. org/">watche s</a></stron g> | <strong><a href="http:/ /www.xnxx80. org/">swiss Mechanical movement replica watches</a>< /str

Donate
Donate and help us fund new challenges
Donate!
Due Date: Sep 30
September Goal: $40.00
Gross: $0.00
Net Balance: $0.00
Left to go: $40.00
Contributors


News Feeds
The Register
Facebook"s Oculus
unveils 360-degree
VR head tracking
"Crescent Bay"
prototype
Google+ GOING,
GOING ... ? Newbie
Gmailers no longer
forced into
mandatory ID slurp
Last chance to
snaffle LOHAN
Kickstarter goodies
Ex-basketball star
CUFFED on suspicion
of stealing Apple
gear worth $14k
All the top tech
news from Vulture
Central this week
Vodafone to buy 140
Phones 4u stores
from stricken
retailer
A spin of roulette
in the sporty Ford
Fiesta Black
Almunia faces
GRILLING from MEPs
over FAILED Google
settlement deal
"People have
forgotten just how
late the first
iPhone arrived ..."
Weekend reads:
Shark, Chapter and
Verse and World War
One retold in Ring
of Steel
Slashdot
"Reactive"
Development Turns
2.0
Is Alibaba
Comparable To a US
Company?
Researchers Report
Largest DNA Origami
To Date
Emails Cast
Unflattering Light
On Internal
Politics of
Healthcare.gov
Rollout
Emails Cast
Unflattering Light
On Internal
Politics of
Obamacare Website
Rollo
Washington DC To
Return To Automatic
Metro Trains
New "Crescent Bay"
VR Headset Revealed
and Demo"d At
Oculus Connect
Is Google"s Non-Tax
Based Public School
Funding Cause For
Celebration?
Ask Slashdot:
Alternate Software
For Use On
Smartboards?
Video Released,
Crowdfunding
Underway For Axiom
Open Source Cinema
Camera
Article viewer

ASP Function to Produce a random IDs



Written by:dimport
Published by:dimport
Published on:2003-06-21 07:19:46
Topic:ASP
Search OSI about ASP.More articles by dimport.
 viewed 7842 times send this article printer friendly

Digg this!
    Rate this article :
This nice little function will return a nice little random string which I use to create ID's for ALL my projects, in any language (just got to edit it). In all the time I have used this sub it has NEVER created the same string twice, and if your not happy with it, just call it twice and then it will half the chances again :D


 
'==============================
'============= CODE ============
'==============================

<%
Function Cript()

    Dim strLetters, g, i

    strLetters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    Randomize Timer
        i = Int(Rnd * 62) + 1
        g = Mid(strLetters, i, 1)
    Cript = Int(Rnd * 999999) + 1 & g

End Function
%>

'==============================
'============= END ============
'==============================

How To Use IT :
 
<% @LANGUAGE=VBScript %>
<% Option Explicit %>
<!-- #Include file="Functions.asp" -->
<%
Dim Cript_String

Cript_String = Cript

Response.Write(Cript_String)

%>


This article was originally written by Cadey

Did you like this article? There are hundreds more.

Comments:
<none>
Anonymously add a comment: (or register here)
(registration is really fast and we send you no spam)
BB Code is enabled.
Captcha Number:



     
Your Ad Here
 
Copyright Open Source Institute, 2006