Introduction to ASP. NET Atlas simple controls-inputcontrol, Textbox, button, and checkbox

Source: Internet
Author: User

Author:Dflying Chen(Http://dflying.cnblogs.com/)

Note: This seriesArticleBasicAtlasTranslation of official documents, familiarAtlasYou can skip this step.

This series has three articles:

    1. ASP. NET AtlasIntroduction to simple controls-- SYS. ComponentBase class andSYS. UI. ControlBase Class
    2. ASP. NET AtlasIntroduction to simple controls-- Inputcontrol,Textbox,ButtonAndCheckbox
    3. 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:

    1. 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.
    2. Validationmessage: This attribute is read-only and returnsString. When verification fails, it contains the firstValidatorIf the verification is successful, it is a null string.
    3. 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.

    1. Text: Get or setTextbox.

BecauseTextboxIn actualProgramDesign is very common, so we often need to extend it. AboutTextboxFor more information, see:

    1. UseASP. NET AtlasDevelopmentIn place editingInput control
    2. 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:

    1. 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.
    2. 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:

    1. 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:

    1. Checked: Get or set to represent thisCheckboxIndicates whether the selected Boolean value is used.

CheckboxThe following events are also provided:

    1. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.