protected void btn_Click(object sender, EventArgs e)
{
string t = txt.Text.Trim();
bool test = true;
for (int i = 0; i < t.Length; i++)
{
if (t[i].ToString().Equals(" ") && t[i - 1].ToString() == " ")
{
test = false;
break;
}
}
if (test)
Response.Write("Valid");
else
Response.Write("INValid");
}