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)