If Trim(textbox.Text) = "" Then Message.Text = "name is required" Exit Sub End If
if (String.IsNullOrEmpty(String.Trim(textbox.Text))) { Message.Text = "name is required"; return; }
Trim
string s = textbox1.Text.Trim();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)