Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox validation

Status
Not open for further replies.

hughejars

Technical User
Mar 14, 2007
91
0
0
GB
Hi guys I'm new to visual C++
so I'm looking for some pointers

can someone tell what is wrong with this statement
{
String^ checkName = firstname_txt->Text;
if (checkName = "")
{
MessageBox::Show("Please Enter\nYour Name.");
label6->Text = L"*";
}
else
MessageBox::Show("Saved.");
}

even if I enter some text in the textbox it will only fire the first condition.

Many thanks


I'm studying hard every day, so why is the learning curve appear to be heading downwards?
 
No problems guys found it on MSDN

if (checkName->Length == 0)

Cheers


I'm studying hard every day, so why is the learning curve appear to be heading downwards?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top