This snippet helps you to generate serial code which can be used for any of your application.
<%@ Page Language="VB" Debug="true" %>
<script runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim chars as string = "ABCDEFGHIJKLMNOPRSTUVYZX0123456789"
Dim i, j, k as integer
Dim s as string
for j = 0 to 4
for k = 0 to 4
i = CInt(Int((33 * Rnd()) 1))
s = mid(chars ,i, 1)
next j
s = "-"
next k
disp.InnerHtml = "Generated Serial Code : " & left(s, 29)
<span id=disp runat="server" />