aspday6

9
Panel Control Usage : The usage of this control is to group all the related controls together (basically for logical grouping) In another words it can be used like in MSDN which shows example on hide.

Upload: srikanth

Post on 13-Sep-2015

213 views

Category:

Documents


1 download

DESCRIPTION

ASPDay6

TRANSCRIPT

  • Panel ControlUsage : The usage of this control is to group all the related controls together (basically for logical grouping)In another words it can be used like in MSDN which shows example on hide.

  • List Box ControlUsage:It is used to select a single or multiple items from a collection of list items.Properties Selection Mode it is used to specify the mode in which the values can be selected from the listbox Control.The default selection mode is single.If the list box control uses a single selection then the properties of the list control with single selection should be used else it should follow the list controls with multi selection.

  • Methods for the List ControlItems.Add( listitem / String)If string passed as a value then text and the value of the listitem will remain the sameControlname.items.Add(String/Listitem)Items.RemoveAt(index)Removes the list item from the specified index no.Items.Clear()Removes all the items present in the list control.

  • Range Validator ControlUsage : It is used to verify the given value for a control to specify with in the required range or not.Properties:Maximum Value Specify the Upper RangeMinimum Value Specify the lower rangeBy default it is String ValuesType Specify the data type to be used for comparison.

  • Custom Validator ControlUsage : It is used to validate the given user input based on the requirements of an applicationNote: In order to specify the validation code it should be written in server validate event handler.Note: if any client side custom validations has to be performed then write the Java Script function and then specify the name of that function for the ClientValidation Function Property of the custom validator.

  • Validation Summary ControlUsage:it is used to validate other validation controls.POINTS TO REMEMBER ABOUT VALIDATION SUMMARYIt is the only control provided by ASP.Net which can project a messagebox.The error specified for the other validation controls will be considered as the input or text for the validation summary Control.When ever the validation summary control is used on the web form it is mandatory to specify the text property for the other validation controls.

  • Validation Summary Control- PropertiesShow Summary will display the error messages on the web form

    Show message Box the error messages will be displayed on message BoxIf show message Box = True then it will be displayed on dialogue box.

  • Regular Expression ValidatorUsage:It is used to validate if the given input by the user satisfies a specific pattern or notProperty:Validation Expression :- It is used to specify the search patternTo achieve : wild card characters to be used.\d Accepts only Numeric Values\D accepts only Character Data\w accepts a word with a blank Space\W accepts a word without a blank space.\s accepts spaces[ a-z A-Z 0-9 _ ] accepts alpha numerical value along with underscore [aeiou] accepts only the specified characters^[a-z A-Z] accepts any character other than the specified patter

  • Regular Expression Validator ContiOccurances:{number}accepts the input if the length of the format specifier is exactly the samefor e.g. \d{5} accepts a 5 digit numerical value.{min,max}accepts the input if the length of the expression is between min and max.For e.g.: [a-z A-Z 0-9]{6,8} accepts an alpha numerical value input of min 6 char and max of 8 char.{min,} accepts the input if the length of the expression is of min characters.? accepts the input of the length zero or one char+ accepts the input of length 1 or any.* accepts the input of length zero or any.