Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add javascript function to asp control

Status
Not open for further replies.

luck576

MIS
May 8, 2001
7
0
0
US
how to add javascript client verify to a web form control?

 
There are verification controls that you can put on your page that will create the javascript behind the scenes for you.

If you're working in visual studio, they should be in your toolbox.

Jack
 
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.

Good luck Crystal
crystalized_s@yahoo.com

--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
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.

Crystal
crystalized_s@yahoo.com

--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top