티스토리 뷰
<%
Function MyRandom( couponLength, couponString )
Const defaultString = "ABCDEFGHIJKLMNOPQRSTUVXYZ0123456789"
Dim nCount, sRet, nNumber, nLengthRandomize 'init random
If couponString = "" Then
couponString = defaultString
End IfnLength = Len( couponString )
For nCount = 1 To couponLength
nNumber = Int((nLength * Rnd) + 1)
sRet = sRet & Mid( couponString, nNumber, 1 )
Next'리턴값
MyRandom = sRetEnd Function
%>
<%
Response.Write "쿠폰넘버: " & MyRandom( 15, "" )
%>
[출처] [ASP] 쿠폰번호 생성|작성자 가능성
'WEB TIP > ASP' 카테고리의 다른 글
Provider error '8007000e' 해결방법 (2003 서버) (0) | 2008.07.09 |
---|---|
PAGE ERROR (0) | 2008.06.23 |
adVarChar 크기 (0) | 2008.02.19 |
블로그 트랙백의 구현 (0) | 2007.12.04 |
블로그 XML RSS 리더의 구현 (0) | 2007.12.04 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- HttpCookie
- MS-SQL
- case
- 숙취
- c#
- ASP.NET
- SQL
- 암호화
- oracle
- .NET Core
- Visual Stuiod Team Services
- jquery
- 문자열 분리
- asp
- 인덱스
- Convert
- pang caching
- gitignore
- 폰트색상
- ADO
- SEQUENCE
- 오라클
- Git
- index
- 영어
- offline application cache
- Windows2003
- IIS
- UTF-8
- injection
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함