c# - Check if a NumericUpDown has no value -


How can I check that the user left a NumericUpDown control blank? I have looked at another question to examine the 'text' property but there is no text property to check against it.

You can check against the text property, though it is a designer and Is hidden from Intelligence.

Just try this sample it works:

  if (string.IsNullOrEmpty (control.Text)) {// a value}  < / Pre>  

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -