Dear,
i am applying server side validation in a cs file button click is like as,
objCM_AddCenter.Centre_Name = Validation.RequiredwithCharactors(txtCenterName.Text,"Name Required");
which itself calls a class file(not cs file) for validation,
public string RequiredwithCharactors(string Value,string message)
{
string reg = @"^[A-Z]|[a-z]+$";
if (Value != "" && Regex.IsMatch(Value, reg))
{
return Value;
}
else
{
Page page=HttpContext.Current.Handler as Page;
common.AlertRedirectWindow(page, message, "~/Form/AddCenter.aspx"); //it is not displaying Alert on the Page
return message;
}
Any help
Go to the complete details ...