Click here to Skip to main content
15,916,600 members
Home / Discussions / C#
   

C#

 
GeneralRe: InitializeComponent method Pin
George_George14-Apr-08 2:06
George_George14-Apr-08 2:06 
GeneralRe: InitializeComponent method Pin
N a v a n e e t h14-Apr-08 0:58
N a v a n e e t h14-Apr-08 0:58 
GeneralRe: InitializeComponent method Pin
George_George14-Apr-08 2:15
George_George14-Apr-08 2:15 
GeneralRe: InitializeComponent method Pin
N a v a n e e t h14-Apr-08 2:26
N a v a n e e t h14-Apr-08 2:26 
GeneralRe: InitializeComponent method Pin
George_George14-Apr-08 2:43
George_George14-Apr-08 2:43 
GeneralBACK TAB Pin
M Riaz Bashir13-Apr-08 23:59
M Riaz Bashir13-Apr-08 23:59 
GeneralRe: BACK TAB Pin
dan!sh 14-Apr-08 0:13
professional dan!sh 14-Apr-08 0:13 
GeneralText Validation Pin
MumbleB13-Apr-08 23:44
MumbleB13-Apr-08 23:44 
Hi Guys. Hope you all had a great weekend.

I want to impliment some further validation on a textbox in one of my applications. I currently only check that the .TextLength is 11 characters and if not to throw an error message. Now, I wan to take it one step further by checking that first character is a specific character say, A or B and if not to throw an error.

i.e I want to check that the first character in A0812345678 is an A or B. If not then then throw error.

Can somebody please help with this?

Below the check to see if it is 11characters long:

if (txtboxHolderRef.TextLength < 11 || txtboxHolderRef.TextLength > 11)
{
    MessageBox.Show("HolderID should be 11 characters" , "Invalid Field Length",
        MessageBoxButtons.OK, MessageBoxIcon.Error);
    return;
}

GeneralRe: Text Validation Pin
phannon8613-Apr-08 23:52
professionalphannon8613-Apr-08 23:52 
GeneralRe: Text Validation Pin
Christian Graus13-Apr-08 23:53
protectorChristian Graus13-Apr-08 23:53 
GeneralRe: Text Validation Pin
MumbleB14-Apr-08 2:39
MumbleB14-Apr-08 2:39 
GeneralRe: Text Validation Pin
Christian Graus14-Apr-08 3:02
protectorChristian Graus14-Apr-08 3:02 
GeneralRe: Text Validation Pin
N a v a n e e t h13-Apr-08 23:56
N a v a n e e t h13-Apr-08 23:56 
GeneralRe: Text Validation Pin
Herman<T>.Instance14-Apr-08 2:38
Herman<T>.Instance14-Apr-08 2:38 
QuestionHow to manipulated arraylist or remove() of arraylist? Pin
vishalcodeproj13-Apr-08 23:36
vishalcodeproj13-Apr-08 23:36 
AnswerRe: How to manipulated arraylist or remove() of arraylist? Pin
Christian Graus13-Apr-08 23:38
protectorChristian Graus13-Apr-08 23:38 
GeneralDataTable.Merge() Method Pin
half-life13-Apr-08 23:32
half-life13-Apr-08 23:32 
Questionhow i apply encript and decript operations in C# Pin
saiftanoli13-Apr-08 23:27
saiftanoli13-Apr-08 23:27 
AnswerRe: how i apply encript and decript operations in C# Pin
Christian Graus13-Apr-08 23:37
protectorChristian Graus13-Apr-08 23:37 
GeneralRetrieving Records from Excel Pin
Dotnetkanna13-Apr-08 23:11
Dotnetkanna13-Apr-08 23:11 
GeneralRegex.Replace Enquiry [modified] Pin
livez13-Apr-08 23:09
livez13-Apr-08 23:09 
GeneralRe: Regex.Replace Enquiry Pin
Christian Graus13-Apr-08 23:36
protectorChristian Graus13-Apr-08 23:36 
GeneralRe: Regex.Replace Enquiry Pin
livez14-Apr-08 1:33
livez14-Apr-08 1:33 
GeneralLazy Loading Pin
satsumatable13-Apr-08 23:09
satsumatable13-Apr-08 23:09 
GeneralRe: Lazy Loading Pin
Christian Graus13-Apr-08 23:35
protectorChristian Graus13-Apr-08 23:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.