views:

25

answers:

1

I've used the code in this article before to create a custom validator to validate mupltiple controls on a page. Using the "inline method" to hook up the validators just beofre the closing form tag.

This time I'm making a user control and want the control to handle the generatio/rendering of the javascript to hook up the validators. The problem is that using the RegisterStartupScript method to add the script will add the script before the automatically added ValidatorOnSubmit() method.

My current thought for a work around is to have a method that can be called from the page containg the control to add the javascritp to hook up the validators but I'd rather have a control I can just drop onto a page without the user having to worry about hooking anything else up.

Is there a way, from my user control to render the javascript to hook up the validaors after the ValidatorOnSubmit() method?

I've tried this.Page.ClientScript.RegisterStartupScript and this.Page.RegisterStartupScript with both rendering the javascript too early.

A: 

I ended up use this control. I really whish I'd found this earlier in the day!

Jon P