i need a code, for registrationform.
The person that wants to registrate need to fill all textboxes.
i want that its working with :
if (..........)
{
usernLbl.ForeColor = Color.Red;
nameLbl.ForeColor = Color.Red;
ageLbl.ForeColor = Color.Red;
countryLbl.ForeColor = Color.Red;
passwordLbl.ForeColor = Color.Red;
}
else
{
// save xml
}
Tnx
I solved it by doin this :
if (string.IsNullOrEmpty(ageTxb.Text))
{
ageLbl.ForeColor = Color.Red;
}
if (string.IsNullOrEmpty(usernameTxb.Text))
{
usernLbl.ForeColor = Color.Red;
}
if (string.IsNullOrEmpty(nameTxb.Text))
{
nameLbl.ForeColor = Color.Red;
}
if (string.IsNullOrEmpty(countryTxb.Text))
{
countryLbl.ForeColor = Color.Red;
}
if (string.IsNullOrEmpty(passwordTxb.Text))
{
passwordLbl.ForeColor = Color.Red;
}
So a sample call would be