validation in login textbox.

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2007
Posts: 7
Reputation: msamir is an unknown quantity at this point 
Solved Threads: 0
msamir msamir is offline Offline
Newbie Poster

validation in login textbox.

 
0
  #1
Feb 8th, 2007
I done my logincontrol project in c# using asp.net2.0. it is accepting spaces in username textbox which i don't want.It should not accept any spaces before entering text.please give solution.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,267
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 544
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: validation in login textbox.

 
0
  #2
Feb 8th, 2007
i have some VB.NET code that searches and removes spaces froma string if thats any use to you
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 7
Reputation: msamir is an unknown quantity at this point 
Solved Threads: 0
msamir msamir is offline Offline
Newbie Poster

Re: validation in login textbox.

 
0
  #3
Feb 8th, 2007
ya will do..send me vb.net solution
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,267
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 544
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: validation in login textbox.

 
0
  #4
Feb 8th, 2007
grr need to install vb again wait a minute
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,267
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 544
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: validation in login textbox.

 
0
  #5
Feb 8th, 2007
i seem to have lost the .NET code but this may be of help - here is some VB6 code that gets you to enter your name and then spilits it

e.g if you inout "James Bennet" it says:

Firstname = James
Lastname = Bennet

  1.  
  2. Private Sub Command1_Click()
  3.  
  4. Dim length As Integer
  5.  
  6. Dim name As String
  7. Dim Firstname As String
  8. Dim LastName As String
  9.  
  10. Dim x As Integer
  11.  
  12. name = InputBox("What is your name")
  13.  
  14. length = Len(name)
  15.  
  16. x = InStr(name, " ")
  17.  
  18. Firstname = Left(name, x)
  19. LastName = Right(name, length - x)
  20.  
  21. MsgBox "The first is " & Firstname
  22. MsgBox "The last name is " & LastName
  23.  
  24. End Sub

you could use something like this on your password program to discard anything after the space
Last edited by jbennet; Feb 8th, 2007 at 10:51 am.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC