I am creating the application for the qa dept of my company in asp.net . the main purpose of the app is to test any registration form of any website dynamically for the exceptions and errors . for example every textbox on the registration page will take in the values dynamically and if the values exceeds the maxlength of the textbox set then it should give the error . this is one of the exception i am talking about there could be many .
now my question is that the textboxes has no built in exception mechnaism and any other control also , so how could i accomplish the task . please give any idea , or information about other tools or languages i can accomplish this task.
You can put any number of validation controls on a textbox. The one you mentioned, limiting maximum length, is easily taken care of:
There is also CustomValidator, which you could use for say, a database lookup to make sure the username wasn't already taken.
<asp:TextBox id="username" runat="server" />
<asp:RangeValidator id="rvusername" Type="integer"
ErrorMessage="Please enter 1 to 20 characters"
Hope this helps.