Hi all,
I am using below code for check space but it generate errors.
my Code::
string str = TextBox1.Text;
int l = str.Length;
int i;
for (i = 0; i < l; i++)
{
if (str[i] == " ")
{
Response.Write("Invalid");
}
else
{
Response.Write("valid");
}
}
Error::
Operator '==' cannot be applied to operands of type 'char' and 'string'
Please help me..
Thanks !
Pankaj Singh