Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have textbox which accepts datetime value.it is used for accept deathdate which is sometimes present.so how can i check whether it is null or not.and for this i want to use only one procedure.so what can i do?
Posted

Something like this pseudo code:

if (string.IsNullOrEmpty(TextBox.Text))
{
   // Do something...
}
else
{
   // Do something else...
}
 
Share this answer
 
Comments
Monjurul Habib 2-Mar-11 14:10pm    
One way ..5+
You can use DBNull.Value[^]

Details and example provided in link itself.
 
Share this answer
 
Comments
Monjurul Habib 2-Mar-11 14:11pm    
another way..5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900