27536 total geeks with 3537 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
ewheregoose
<ul><li><str ong><a href="http:/ /www.billige rmoncler.com /">Discount Moncler on sale</a></st rong> </li>< li><strong>< a href="http:/ /www.billige rmoncler.com /">Cheap Moncler</a>< /strong> </l i><li><stron g><a href="http:/ /www.billige rmoncler.com /">Cheap Moncler
ewheregoose
<ul><li><str ong><a href="http:/ /da.ereplica watches.net/ ">replika ure</a></str ong></li><li ><strong><a href="http:/ /da.ereplica watches.net/ ">falske ure</a></str ong></li><li ><strong><a href="http:/ /www.ereplic awatches.net /da/">falske ure</a></str ong></li></u
ewheregoose
<br><strong> <a href="http:/ /da.replicaw atchesbrand. net/">est schweiziske replika ure</a></str ong><br><str ong><a href="http:/ /www.replica watchesbrand .net/da/">es t schweiziske replika ure</a></str ong><br><str ong><a href="http:/ /da.replicaw atchesbrand. net/">
dkagundyshari
dkagundyshari
<ul><li><str ong><a href="http:/ /da.pens-onl ine.com/">mo ntblanc Meisterstuck </a></strong ></li><li><s trong><a href="http:/ /da.pens-onl ine.com/">Mo ntblanc pen</a></str ong></li><li ><strong><a href="http:/ /da.pens-onl ine.com/">Mo nt Blanc</a></s trong></li>< /ul>

Donate
Donate and help us fund new challenges
Donate!
Due Date: Jul 31
July Goal: $40.00
Gross: $0.00
Net Balance: $0.00
Left to go: $40.00
Contributors


News Feeds
The Register
Google"s new view
of the world takes
two pics to make
"DeepStereo" 3D
BOT-GEDDON coming
after ZeusVM leak,
hacker warns
Behold the mighty
Swiss SPACE JUNK
NOSHER PODULE
XSSposed launches
pay-whatever bug
bounty
Google yanks fake
Android battery
monitor
Samsung slumps,
seven quarters in a
row
Pwned Hacking Team
tells cops, govts
to shut down
software
Cisco slings
simoleons at
software-defined
networking biz
6Wind
TPP partners plot
milder copyright
takedown rules
Indian DEITY plans
14 Exabyte cloud
storage rig
Slashdot
Mozilla"s Plans For
Firefox: More
Partnerships,
Better Add-ons,
Faster Updates
Extreme Reduction
Gearing Device
Offers an Amazing
Gear Ratio
Click-Fraud Trojan
Politely Updates
Flash On
Compromised
Computers
How Bad User
Interfaces Can Ruin
Lives
Prototype Wave
Energy Device
Passes
Grid-Connected
Pilot Test
Supercomputing
Cluster Immersed In
Oil Yields Extreme
Efficiency
Philips Is
Revolutionizing
Urban Farming With
New GrowWise Indoor
Farm
What Goes Into a
Decision To Take
Software From
Proprietary To Open
Source
More Supermassive
Black Holes Than We
Thought!
"We Screwed Up,"
Says Reddit CEO In
Formal Apology
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 8233 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