It means u want server side validation . u write function like that :
Protected string fnValidate()
{
string strMsg = string.Empty;
try
{
if (textbox1.Text ==string.Empty )
{
strMsg ="Enter Name";
return strMsg;
}
return strMsg;
}
catch (Exception ex)
{
strMsg ="Exception error occured.!";
return strMsg;
}
}
u can try like that for your controls.
suppose u r validating on your button click event then u should call this function on that event.