27630 total geeks with 3538 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
of discount.Don 't ever toss in the towel if these people say zero.A statement like "is the fact that best you can try? " will encourage a great discount. *Often, people during the military get good resort rates.Ordina rily, discounts can be obtained to gov
ewheregoose
[b][url=http ://www.swiss watches-coll ection.com/] swiss Mechanical movement replica watches[/url ][/b] [url=http:// allbrandwatc hes11630.web s.com]swiss Mechanical movement replica watches[/url ] [b][url=http ://www.swiss watches-coll ection.com/] high quality r
ewheregoose
<strong><a href="http:/ /www.swisswa tches-collec tion.com/">s wiss Mechanical movement replica watches</a>< /strong> <br ><strong><a href="http:/ /www.swisswa tches-collec tion.com/">h igh quality replica watches for men</a></str ong> <strong ><a href="http:/ /www.sw
ewheregoose
[b][url=http ://www.cheap linksoflondo ncharms.net/ ]links of londo<strong ><a href="http:/ /www.cheapli nksoflondonc harms.net/"> links of london sweetie bracelet</a> </strong> <b r> <strong><a href="http:/ /www.cheapli nksoflondonc harms.net/"> links of london friends
ewheregoose
[b][url=http ://www.timbe rlandproof.c om/]timberla nd boots[/url][ /b] [b]<a href="http:/ /www.timberl andproof.com /">timberlan d outlet</a>[/ b] [b][url=h ttp://www.ti mberlandproo f.com/]timbe rland uk[/url][/b] http://www.c heapjerseysp opular.com/ cheap nfl

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
You tried to hide
your extramarital
affair ? by putting
it on the web?
Oracle laying off
its Java
evangelists? Er, no
comment, says
Oracle
Mind-blowing
secrets of NSA"s
security exploit
stockpile revealed
at last
Oracle"s bright new
Sonoma SPARCs hint
at own-tech cloud
Game, set and
DEATHMATCH: Drone
TERROR ORDEAL at US
Open tennis
tournament
Spotify updates
hated privacy
policy ... with
exact same policy
Hackers spent at
least a year spying
on Mozilla to
discover Firefox
security holes ?
FTC gives FBI the
finger over govt
backdoor encryption
demands
Daredevil Brit
lifts off in
54-prop
quinquaquadcopter
Reg readers
select infosec
A-Team to save
Ashley Madison
Slashdot
Lack of Teacher
Training Hampers UK
Programming
Education
Persistent Cyber
Spies Try To
Impersonate
Security
Researchers
Dirty Farm Air May
Ward Off Asthma In
Children
Report: Google Will
Return To China
Toyota To Spend $50
Million On
Self-Driving Car
Tech
Snowden: Clinton"s
Private Email
Server Is a
"Problem"
In New Study, HIV
Prevention Pill
Truvada Is 100%
Effective
Bugzilla Breached,
Private
Vulnerability Data
Stolen
Brady Forrest Talks
About Building a
Hardware Startup
(Video)
20+ Chinese Android
Smartphones Models
Come With
Pre-Installed
Malware
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 8313 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