Author:Dflying Chen(Http://dflying.cnblogs.com/)
Note: This seriesArticleBasicAtlasTranslation of official documents, familiarAtlasYou can skip this step.
This series has three articles:
- ASP. NET AtlasIntroduction to simple controls-- SYS. ComponentBase class andSYS. UI. ControlBase Class
- ASP. NET AtlasIntroduction to simple controls-- Inputcontrol,Textbox,ButtonAndCheckbox
- ASP. NET AtlasIntroduction to simple controls-- Label,Hyperlink,SelectAndImage
This is the second article:ASP. NET AtlasIntroduction to simple controls-- Inputcontrol,Textbox,ButtonAndCheckbox
Atlas
All client controls in are inherited or indirectly inherited fromSYS. UI. ControlBase class (see:ASP. NET AtlasIntroduction to simple controls-- SYS. ComponentBase class andSYS. UI. ControlBase Class).AtlasBuilt-in simple controlsInputcontrol,Textbox,ButtonAndCheckbox.
SYS. UI. inputcontrol
InputcontrolA class is an abstract class that serves as a control that provides user input (for exampleTextbox, See the following.) The base class provides public operations such as input data verification.InputcontrolAbstract classes provide the following attributes:
- Isvalid: This attribute is read-only. A boolean value is returned, which indicates whether the input data is valid after verification, that is, whether it has passed allValidator(See:InASP. NET AtlasCreate a customValidator.
- Validationmessage: This attribute is read-only and returnsString. When verification fails, it contains the firstValidatorIf the verification is successful, it is a null string.
- Validators: ReturnsInputcontrolOfValidatorSet. You can add/DeleteValidatorTo verify user input information.
SYS. UI. textbox
TextboxControls are anyGuiIt is also one of our most commonly used controls that interact with users.AtlasInTextboxEncapsulatedTypeIsInputOfDomElementInput, OrDomElementTextarea, Inherited fromInputcontrolBase class to obtain the input data verification function.TextboxProvides the following attributes.
- Text: Get or setTextbox.
BecauseTextboxIn actualProgramDesign is very common, so we often need to extend it. AboutTextboxFor more information, see:
- UseASP. NET AtlasDevelopmentIn place editingInput control
- UseASP. NET AtlasDevelopment automatically adjusts the number of lines with the input contentTextarea
SYS. UI. Button
ButtonControl inGuiIs equally important.AtlasSetDomElementButtonConcept extension to enableButtonNot just a single fingerTypeIsButtonOrSubmitOfHTML inputAnd can be appliedSpan,AProvides unified programming interfaces for developers.ButtonThe following two attributes are provided:
- Command: Get or set to represent thisButtonCommand nameString. WhenButtonThe parent control of allowsEvent bubblingTheOnbubbleeventThe event handler function can access this attribute to obtainButtonThe name of the passed command.
- Argument: Get or set to represent thisButtonTheString. TheButtonThe parent control of allowsEvent bubblingTheOnbubbleeventThe event handler function can access this attribute to obtainButtonThe passed parameters.
The above two attributes are very useful in some situations. You can refer to this article:UseASP. NET Atlas pagenavigatorControls implement client paging navigationSee their actual application.
ButtonThe following events are also provided:
- Click: InButtonTriggered when clicked.
Note: WhenButtonThis is the first triggerButtonOfClickEvent, and then triggerButtonParent control'sOnbubbleeventEvent.
SYS. UI. checkbox
AtlasInCheckboxEncapsulatedTypeIsCheckboxOfInput domElement. You can use it to enter a Boolean value.CheckboxProvides the following attributes:
- Checked: Get or set to represent thisCheckboxIndicates whether the selected Boolean value is used.
CheckboxThe following events are also provided:
- Click: InCheckboxTriggered when clicked.
the controls mentioned in this article are very simple. Therefore, we will skip the sample program. You are welcome to leave your comments or raise your questions. In the next article, I will introduce select , hyperlink , label and image controls.