can anybody tell me the way to check whether the user name entered is contained space or not. using asp.net membership control, thanks
![]() |
0 |
![]() |
It will be good if you let us know the exact requirement. anyways, space checking can be done this way
if(TextBox1.Text.IndexOf(string.Empty) > 0)
lblError.Text="space present" ;
SHASHANK BHIDE
CAPGEMINI INDIA
"THE ROAD TO SUCCESS IS ALWAYS UNDER CONSTRUCTION MARK MY RESPONSE AS ANSWER TO HELP ME BUILD IT :)"
![]() |
0 |
![]() |
Instead of using string.Empty, it should be
if (TextBox1.Text.IndexOf(" ") > 0)
{
lblError.Text="space present";
}
Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
![]() |
0 |
![]() |
YES YES, U R RIGHT, MY MISTAKE, HOW SPACE CAN BE EMPTY
SHASHANK BHIDE
CAPGEMINI INDIA
"THE ROAD TO SUCCESS IS ALWAYS UNDER CONSTRUCTION MARK MY RESPONSE AS ANSWER TO HELP ME BUILD IT :)"
![]() |
0 |
![]() |