title: Where should I write common javascript code related to controls
body: <p>I am in a situation to write some client side validation. For example, in a page I use a <code>Repeater</code> 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. </p>