ASP.NET

1. ASP.NET Introduction 2. Comp of .Net Framework 3.5 3. Sys.Req for VS 2008 4. ASP.NET Envrmnt Setup 5. VS2010 Ultimate Sys.Req 6. Installing VS 2010 7. VS 2012 Sys.Req 8. Installing VS Exp 2012 9. Start the VS 2008 10. Application Life Cycle 11. Page Life Cycle 12. Page Life Cycle Events 13. ASP.NET Example 14. Event Handling 15. Default Events 16. Server Side 17. Request Object 18. Response Object 19. Server Controls 20. Server Controls Properties 21. Server Controls Methods 22. HTML Server Controls 23. Client Side 24. ASP.NET Basic Controls 25. TextBox Control 26. CheckBox Controls 27. RadioButton Controls 28. ListBox Control 29. HyperLink Control 30. Image Control 31. BulletedList Control 32. ASP.NET Directives 33. Implements Directive 34. Master Type Directive 35. Page Directive 36. PreviousPage Type 37. Managing State 38. Control State 39. Cookies 40. Query Strings 41. Server-Side State 42. Session State 43. Validation Controls 44. Required FieldValidator 45. Range Validator 46. Compare Validator 47. RegularExpressionValidator 48. Custom Validator 49. Validation Summary 50. Data Source Control 51. AdRotator Control 52. Calendar Control 53. Calendar Control Example 54. Panel Control 55. Panel Control Example 56. Multi Views Control 57. MultiView & View controls 58. MultiView Control Example 59. FileUpload Control 60. FileUpload Control Eg 61. AJAX Control 62. UpdatePanel control 63. UpdateProgress Control 64. Custom Controls 65. Custom Control Eg 66. Personalization 67. Create Simple Profile 68. ADO.NET 69. ADO.NET Objects 70. DataTable 71. DataRow 72. DataColumn 73. Object Example 74. Error Handling 75. Tracing Errors 76. Debugger 77. Security 78. Authentication 79. Authorization 80. LINQ 81. LINQ Query Operators 82. LINQ Example 83. Caching 84. Data Caching 85. Output Caching 86. Object Caching 87. Web Services 88. Create Web Services Eg 89. Web & Machine.config 90. Settings Schema 91. ASP.NET Deployment 92. XCopy Deployment 93. Web Setup Project 94. ASP Interview Part 1 95. ASP Interview Part 2 96. ASP Interview Part 3 97. ASP Interview Part 4 98. ASP Interview Part 5 99. ASP Interview Part 6
Pr.Pg Next Pg

ASP.NET Validation Controls tutorials

  • An important aspect of creating ASP.NET Web pages for user input is to be able to check that the information users enter is valid.

  • ASP.NET provides a set of validation controls that provide an easy-to-use but powerful way to check for errors and, if necessary, display messages to the user.

  • There are six types of validation controls in ASP.NET

    1. RequiredFieldValidation Control

    2. RangeValidator Control

    3. CompareValidator Control

    4. RegularExpressionValidator Control

    5. CustomValidator Control

    6. ValidationSummary

 

 The Standard Validation Controls

  • The five validation controls ultimately all inherit from the same base class, and thus share some common behavior. Four of the five validation controls operate in the same way, and contain built-in behavior that allows you to validate associated controls. The last control, the CustomValidator allows you write custom functionality that is not supported out of the box.

  • The following table lists the properties that are shared by the validation controls and that you commonly use when working with validation controls.

 

Properties

Description

Display

This property determines whether the hidden error message takes up space or not. With the Display set to Static, the error message takes up screen estate, even when it is hidden.

CssClass

This property allows you to set the CSS class that is applied to the

error message text.

ErrorMessage

This property refers to the error message for the validation control

used in the ValidationSummary control. When the Text property is

empty, the ErrorMessage value is also used as the text that appears

on the page.

Text

The Text property is used as the text that the validation control displays on the page. This could be an asterisk (*) to indicate an error or a required field, or text like “Please enter your name.”

ControlToValidate

This property contains the ID of the control that needs to be validated.

EnableClientScript

This property gets or sets a setting that determines whether the control provides validation at the client. The default is True.

SetFocusOnError

This property determines whether client-side script gives the focus to

the first control that generated an error. This setting is False by default.

ValidationGroup

Validation controls can be grouped together, allowing you to perform

validation against a selection of controls. All controls with the same

ValidationGroup are checked at the same time, which means that

controls that are not part of that group are not checked.

IsValid

You don’t typically set this property at design time, but at runtime it

provides information about whether the validation test has passed.

 

Pr.Pg border                                              Next Pg