I am in a situation to write some client side validation. For example, in a page I use a Repeater control which creates a list of item. There we could select number of items using a check box (in the first column). So if I click ‘Delete’ button, the selected cases will be deleted. So I need to check if the selected item’s count is zero or not. So my question is, where should I write this kind of validations ? In a common .js file or in the page itself.
I am in a situation to write some client side validation. For example, in
Share
This should be done in a separate file. You will encounter times when you will need to have the id of the control being validated for one reason or another so you should provide a manner within that file to receive those ids (parameter name in a function, global variable (not recommended), custom namespace object).