473,473 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

vb .net Express edition

1 New Member
ok so i have to make a simple program that when a user enters a password, the verify button will run and will check to make sure that the password meets 2 criterias. 1. 6 characters or more 2. must contain atleast 1 letter and number.

If Isvalid(CStr(True)) Then
MessageBox.Show("That is Valid", "VALID")
Else
MessageBox.Show("That is invalid", "INVALID")
txtPassword.Focus()
txtPassword.SelectAll()

'declare boolean variable
Dim blnStatus As Boolean
'function to test that the password entered meets criteria
If Not txtPassword.Text.Length < 6 And Not IsNumeric(txtPassword.Text) Then
blnStatus = True
Else
blnStatus = False
End If
Return blnStatus

End Function

I can make sure the the length is no less than 6 and that it cannot hold only numerical values , but how do i prevent a user from entering only letters as a password. Thanks
Feb 22 '07 #1
1 1016
AricC
1,892 Recognized Expert Top Contributor
ok so i have to make a simple program that when a user enters a password, the verify button will run and will check to make sure that the password meets 2 criterias. 1. 6 characters or more 2. must contain atleast 1 letter and number.

If Isvalid(CStr(True)) Then
MessageBox.Show("That is Valid", "VALID")
Else
MessageBox.Show("That is invalid", "INVALID")
txtPassword.Focus()
txtPassword.SelectAll()

'declare boolean variable
Dim blnStatus As Boolean
'function to test that the password entered meets criteria
If Not txtPassword.Text.Length < 6 And Not IsNumeric(txtPassword.Text) Then
blnStatus = True
Else
blnStatus = False
End If
Return blnStatus

End Function

I can make sure the the length is no less than 6 and that it cannot hold only numerical values , but how do i prevent a user from entering only letters as a password. Thanks
Check the input against a regular expression. This should help.

Aric

Aric
Feb 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
1
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005...
4
by: Andrew Robinson | last post by:
My main dev machine has WinXp and VS2005 (pro). 1. I need to install VWD Express Edition so that I can do some instruction on this. Any issues with both on the same machine. Installation order?...
11
by: sumana_m | last post by:
I have downloaded the freely available express edition of Visual Web Developer. If I develop an application using this, will I be able to market my product for commercial purposes without having...
3
by: Steve | last post by:
Hi All I downloaded Sql server 2005 express SP2 and attempted to modify the Bootstrapper package files as I did with SP1 When i try to install SQL server as part of my VS 2005 deployment app I...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.