ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources] - نسخه متنی

G. andrew Duthie; matthew Macdonald

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید









CustomValidator.NET 1.1, disposable

System.Web.UI.MobileControls (system.web.mobile.dll)class

The CustomValidator control allows you to define
your own validation routines. A similar task could be performed by
writing manual validation code in the click event for a submit
button, but using a CustomValidator allows you to
create validation code that will run any time the page is validated,
and can provide a "vote" used for
the MobilePage.IsValid property along with all
other validation controls. A CustomValidator can
also be easily reused to validate multiple controls.

To provide server-side validation, create an event handler for the
ServerValidate event. The string from the input
control and the result of the validation is stored in the provided
System.Web.UI.WebControls.ServerValidateEventArgs
object. In this way, the CompareValidator works
exactly the same as the
System.Web.UI.WebControls.CustomValidator control,
although it doesn't include the ability to define
client-side validation logic using a JavaScript function, because few
mobile devices would support it.

public class 

CustomValidator : BaseValidator {
// Public Constructors
public

CustomValidator ( );
// Protected Instance Methods
protected override bool

ControlPropertiesValid ( ); // overrides BaseValidator
protected override BaseValidator

CreateWebValidator ( ); // overrides BaseValidator
protected override bool

EvaluateIsValid ( ); // overrides BaseValidator
protected virtual bool

OnServerValidate (string

value );
// Events
public event ServerValidateEventHandler

ServerValidate ;
}



Hierarchy


System.Object
System.Web.UI.Control(System.ComponentModel.IComponent,
System.IDisposable
,
System.Web.UI.IParserAccessor,
System.Web.UI.IDataBindingsAccessor)

MobileControl(System.Web.UI.IAttributeAccessor)
TextControl
BaseValidator(System.Web.UI.IValidator)
CustomValidator


/ 873