TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
MadhuSudhan H N
NA
7
3.2k
Random Password generation
Nov 26 2012 12:25 AM
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim allowedChars As String = ""
allowedChars = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,"
allowedChars += "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,"
allowedChars += "1,2,3,4,5,6,7,8,9,0,!,@,#,$,%,&,?"
Dim sep As Char() = {","c}
Dim arr As String() = allowedChars.Split(sep)
Dim passwordString As String = ""
Dim temp As String = ""
Dim rand As New Random()
For i As Integer = 0 To Convert.ToInt32(TextBox27.Text) - 1
temp = arr(rand.[Next](0, arr.Length))
passwordString += temp
Next
TextBox27.Text = passwordString
End Sub
I am getting an error for the above Code
Input string was not in a correct format.
Reply
Answers (
6
)
i created on rdlc Bar charts in Winforms. it's working fine.
How to recover database when exe/software crashed in C#?