Author: karang | Posted on: 9/25/2008 7:29:06 PM | Views : 928

Hi

I have a textbox txtName which I want to validate for empty.

For that I have written a custom function
public bool IsEmpty(string strText)
{
if (strText.Trim() == string.Empty)
{
return true;
}
else
{
return false;
}

}

I have written a custom validation control for txtName and validation summary





I have written ValidatePage() function as

public void ValidatePage(object sender, ServerValidateEventArgs args)
{

if (IsEmpty(txtName.Text))
{
args.IsValid = true;
}
}

But I am not able to see validation summary

Am I missing something.

Kindly advice

Regards
Karan
...

Go to the complete details ...