Custom Server Control: TextBox Control with verification function (Only For IE)

Source: Internet
Author: User

In the previous project, a large number of text boxes were used for digital input. For the use of traditional page verification or ASP. NE verification controls, the workload was huge.
When taking the value of the numeric text, you must first check whether it is filled in.
In order to avoid the above problems, the HTC client verification input is specially written, but this verification method is implemented by the customer segment and there is no server segment verification.
The MicroSystem. WebControls. TextBox Control is written to combine the client and server verification. The control fully implements the HTC client verification input.
The server segment verification function is being added.

Some are the code used by the page:
MicroSystem. WebControls. TextBox (IE5 + ):
Basic verification usage:
<Msi: TextBox ID = "Price" runat = "server" CssClass = "DataCheck" DataType = "UFloat"> </msi: TextBox> server Value
Obj. PRRN = Price. Value
'Add Value property to automatically convert null to 0

Custom verification usage:
<Msi: TextBox ID = "Zip"
CssClass = "DataCheck"
DataType = "Custom"
ValidExpression = "/^ \ d {6} $ /"
ValidExpressionExpand = "/^ \ d {0, 6} $ /"
ErrorMessage = "zip code"
MustInput = "true"/>

The following are some other controls in the control set:

MicroSystem. WebControls. Datebox date text box (IE5 + ):
Comes with the calendar selection function (calendar uses the plum blossom rain calendar Control) to View Details
<Msi: DateBox ID = "OpenDate" runat = "server" CssClass = "SetDate"> </msi: DateBox>

MicroSystem. WebControls. DropDownList drop-down box:
A blank row can be added by default (only available when data is bound through DataSource)

MicroSystem. WebControls. CheckBox multiple selection box:
Add attribute Value as the original HTMLElement. If the returned Value is selected, the returned Value is null.

For details about the other controls, refer:

Hope to be useful to everyone!

MicroSystem.WebControls.zip (including all source code, DLL, documentation, and instances)

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.