If you don't want to rely on built in controls you can put in javascript just like you would in any other html. The only thing you will have to be sure of is that in order to use it you may have to sacrifice using some web controls that you would like to use.
What I mean by this is that if you want the validation to occur on submit you will probably have to use an html control to handle your submit action instead of using a web control.
I don't know if this helps or not, but I know there is always a balancing act for deciding where the web controls are appropriate and where they are not. It is easy to assume that they are always the best thing to use because they are so easy to use. This is simply not the case, sometimes you need to do something with javascript and html controls to get the effect you want.
Sorry I forgot to add that you can also use the
control.attributes.add() function. You specify the attribute you want to add and what you want the value to be. It will add the attribute to the rendered html tag.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.