Generate Serial Code - Asp.net

Serial code

Snippet Code


  
Rate this page :
  [ 0 votes]

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" />

Tags


Ask Questions

Ask Question