How To Solve This ? start wtih numeric Value
-
In textbox.. when ever user write his address, He has to start with Numeric value then after all he can use what ever he want ? if he not use numreic value, then message come up. Can anyone help me with that? -Thanks
Peter
-
create an event listener for the textbox textchanged event, parse the string, if the first character (or two or three, etc..) are numeric, then proceed, else, if the first char is not numeric, display a messagebox and clear the textbox.
-
but how do i chek that condition...i have to use substring or pls help me with that ?
Peter
use if(IsNum(textBox1.Text[0])), As IsNum is a function you may create and takes a parameter of char to check if its a number.
-
In textbox.. when ever user write his address, He has to start with Numeric value then after all he can use what ever he want ? if he not use numreic value, then message come up. Can anyone help me with that? -Thanks
Peter
pakpatel wrote:
when ever user write his address, He has to start with Numeric value
Are you really, really sure about that?? You're making a bad assumption here...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
pakpatel wrote:
when ever user write his address, He has to start with Numeric value
Are you really, really sure about that?? You're making a bad assumption here...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
In textbox.. when ever user write his address, He has to start with Numeric value then after all he can use what ever he want ? if he not use numreic value, then message come up. Can anyone help me with that? -Thanks
Peter
Split the numeric part away from the non-numeric part.
-
In textbox.. when ever user write his address, He has to start with Numeric value then after all he can use what ever he want ? if he not use numreic value, then message come up. Can anyone help me with that? -Thanks
Peter
use Regex when the textbox fires it's Validating event. if the Regex fails, you can clear the box. http://www.dotnetcoders.com/web/Learning/Regex/syntax.aspx[^]
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
-
A good app starts with good solid requirements. Your customers are not software developers. They have no concept of what is and isn't best practice. If the customer wants something that is known to be bad practice, it's part of your job to hash this requirement out and make sure that the customer understands that this will affect the quality of the app and spell out what the potential pitfalls are, and have the customer sign off on the bad requirement. The last thing you need is to give the customer everything they wanted and them not give you what you wanted ($$$) because the app didn't do everything they envisioned it doing.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
In textbox.. when ever user write his address, He has to start with Numeric value then after all he can use what ever he want ? if he not use numreic value, then message come up. Can anyone help me with that? -Thanks
Peter
Perhaps if you communicated to your client some more concrete examples... There are legitimate addresses that don't start with a number. Private roads sometimes are used Waverly Place Anytown, XX, 12345 Sometimes people spell out numbers as well: One Rockefeller Plaza Some begin with directions: West 106 Broadway As long as you're dealing with a small, known pool of addresses, you'll be OK. However, if you're soliciting general address input, I'd stay away from this rule. Just my 2 cents... Good luck!
-
A good app starts with good solid requirements. Your customers are not software developers. They have no concept of what is and isn't best practice. If the customer wants something that is known to be bad practice, it's part of your job to hash this requirement out and make sure that the customer understands that this will affect the quality of the app and spell out what the potential pitfalls are, and have the customer sign off on the bad requirement. The last thing you need is to give the customer everything they wanted and them not give you what you wanted ($$$) because the app didn't do everything they envisioned it doing.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Agree with Dave. If you give the customer exactly and literally what they wanted, you will find that in the end you have a system that is hard to maintain, with a lot of loop holes, and does not handle situations that did not occurs to the customer that it may happens, at that moment.