To check if a string or textbox is empty, simply follow the code snippet below.
if (!string.IsNullOrEmpty(textboxName.Text)
{
//This will if a textbox is not empty
}
if (!string.IsNullOrEmpty(stringName)
{
//This will if a string variable is not empty
}
No comments:
Post a Comment