conditions problem
-
I need to clarify this... My code WAS like this: private void button3_Click(object sender, System.EventArgs e) { if(Validate(textBox4.Text)) { if (tabControl1.TabPages.Contains(tabPage6)) { } else { tabControl1.TabPages.Add(tabPage6); } } else { // show invalid username dialogbox } } // Conditions to determine whether a tab page is to be displayed when Go button is clicked private bool Validate(string Val) { if(Val!="") { if(Val.Length==9||Val.Length==12) { return true; } else return false; } else return false; } I donno how to edit my codes with the codes u gave me to make my app run.. can u teach me what's going on? In fact, I also need to open a tab page if the text input is made up of 12 digits.. Therefore, a tab page should open when the text input is \d{12} OR [sSfF]\d{7}[a-zA-Z].. The user is allowed to key in anything he wishes but the tab page will not open if what he entered doesnt meet the conditions set.. Thank you!
-
u r v detailed n i cld follow >> you are very detailed and i could follow =) do u understand my "english" or do i have to type properly? sorry if you didnt.
Generally, this kind of !33tspeek is not really welcome here. On the one hand it gives us the impression of talking to a 14-year old, on the other hand it's rather rude if people take their time to answer your problems and you don't even spend enough time to write properly. mav
-
Generally, this kind of !33tspeek is not really welcome here. On the one hand it gives us the impression of talking to a 14-year old, on the other hand it's rather rude if people take their time to answer your problems and you don't even spend enough time to write properly. mav