Checking if TextBox is empty?
IN C# ASP
METHOD1-
if (MyTextBox.Text == String.Empty)
{
// the textbox is empty
}
{
// the textbox is empty
}
METHOD2
if ( MyTextBox.Text.Length == 0 )
{
// the textbox is empty
}
HERE MyTextBox IS THE ID OF THE TEXTBOX
HOW TO CHECK WETHER THE TEXT BOX FIELDS ARE EMPTY IN C# ASP-TEXT BOX FIELDS ARE EMPTY IN C# ASP-CHECK TEXT BOX FIELDS ARE EMPTY IN C# ASP
if ( MyTextBox.Text.Length == 0 )
{
// the textbox is empty
}
HERE MyTextBox IS THE ID OF THE TEXTBOX
HOW TO CHECK WETHER THE TEXT BOX FIELDS ARE EMPTY IN C# ASP-TEXT BOX FIELDS ARE EMPTY IN C# ASP-CHECK TEXT BOX FIELDS ARE EMPTY IN C# ASP