What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 17957 |  Welcome, Guest!   Register  Login
 Home > Code Snippets > ASP.NET > Generating Serial Code For the Applications in Dot Net ...
Chikul

Generating Serial Code For the Applications in Dot Net

 Code Snippet posted by: Chikul | Posted on: 1/25/2010 | Category: ASP.NET Codes | Views: 790 | Status: [Member] | Alert Moderator   


It will generate Serial code of 29 characters that is 5 group of characters separated by "-" as follows :
Serial Code : OJ40J-ZICBK-2JHPI-LBPG4-U06KS


     Protected Sub btnFile_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnFile.Click

'Generating Serial Code For the Applications in Dot Net
Dim chars As String = "ABCDEFGHIJKLMNOPRSTUVYZX0123456789"
Dim i, j, k As Integer
Dim l As String = ""
For j = 0 To 4
For k = 0 To 4
i = CInt(Int((33 * Rnd()) + 1))
l += Mid(chars, i, 1)
Next k
l += "-"
Next j
Response.Write("Serial Code : " & Left(l, 29))
End Sub

Found interesting? Add this to:


>> Write Response - Respond to this post and get points

More codes snippets

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/23/2013 1:51:39 AM