If you are using JavaScript/CSS, you must use 'id' of control to apply any CSS/JavaScript stuff on it.
If you use name, CSS won't work for that control. As an example, if you use a JavaScript calendar attached to a textbox, you must use id of text control to assign it the JavaScript calendar.