using System; namespace MonoTests.SystemWeb.Framework { /// /// This is a container for a control used by . /// /// [Serializable] public class BaseControl { /// /// Default constructor; does nothing. /// public BaseControl () { } /// /// Creates a instance, initializing the /// and properties with /// the given values. /// /// The name of the control. /// The value of the control. /// /// public BaseControl (string name, string value) { _name = name; _value = value; } string _name; /// /// The name of the control. /// public virtual string Name { get { return _name; } set { _name = value; } } string _value; /// /// The string value of the control. /// public virtual string Value { get { return _value; } set { _value = value; } } /// /// Returns true, if the control is valid for submission. Override this method /// to implement validation of different controls. See /// /// public virtual bool IsSuccessful () { return true; } } }