Using If statement with a button action to stop it if information is missing

Please support our C# advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Apr 2009
Posts: 5
Reputation: lyvenice is an unknown quantity at this point 
Solved Threads: 0
lyvenice lyvenice is offline Offline
Newbie Poster

Using If statement with a button action to stop it if information is missing

 
0
  #1
Apr 19th, 2009
THis is what i did
if
(txtName.Text == "")
{
MessageBox.Show(
"All Field must be Fill in!!!","Missing Information", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
what do i write on the if, to stop the button from executing the label action since information is missing?
Last edited by lyvenice; Apr 19th, 2009 at 5:09 pm.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum


Views: 215 | Replies: 0
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC