C Sharp And Ms Access Database Tutorial 14 How To Clear Input Fields Text Boxes And Picture Box

C# And Ms Access Database Tutorial #14 – How To Clear Input Fields Text Boxes And Picture Box

VIDEO TUTORIAL

C# And Ms Access Database Tutorial #14 – How To Clear Input Fields Text Boxes And Picture Box

This Tutorial Shows How To Clear Input Fields Text Boxes And Picture Box In C# Windows Forms Application using visual studio 2010.

C# SOURCE CODE

        //Function For Clearing Input Fields
        private void clearInputFields()
        {
            //First check If All Input Fields Are Empty
            if (String.IsNullOrEmpty(txtFullName.Text) && String.IsNullOrEmpty(txtEmailAddess.Text) && String.IsNullOrEmpty(txtPhoneNumber.Text) && String.IsNullOrEmpty(txtLanguage.Text) && String.IsNullOrEmpty(txtCountry.Text) && String.IsNullOrEmpty(txtgender.Text) && String.IsNullOrEmpty(txtImagePath.Text) && pictureBox1.Image == null)
            {
                MessageBox.Show("All Input Fields Are Empty......");
            }
            else
            {
                //clearing TextBoxes
                txtID.Text = string.Empty;
                txtFullName.Text = string.Empty;
                txtEmailAddess.Text = string.Empty;
                txtPhoneNumber.Text = string.Empty;
                txtLanguage.Text = string.Empty;
                txtCountry.Text = string.Empty;
                txtgender.Text = string.Empty;
                txtImagePath.Text = string.Empty;
                //clearing PictureBox
                pictureBox1.Image = null;
            }
        }
READ MORE  How To Fix Location Is Not Available D Is Not Accessible Windows 10, The File Or Directory Is Corrupted And Unreadable Problem Solved

Leave a Reply

Your email address will not be published. Required fields are marked *