471,071 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

Validation Controls, Override/append Client Side Functionality

Hello,

I am wondering how can I Override/Append to the Client Side JavaScript of a
System.Web.UI.WebControls.RequiredFieldValidator Control.

I actually need to only add few lines of JavaScript to the Microsoft
Supplied JavaScript Function.

So I need to Just extend it to do one or two extra things for me.

I know I can create a new Validation Control to do such thing but I wonder
If I can Inherit the exiting functionality.

If I inherit the "System.Web.UI.WebControls.RequiredFieldValida tor" How can
I call the base class JavaScript that does the validation and then add some
more to it.

I have seen Scott Michell's "Creating Validator Controls for CheckBox"
etc... No inheritance because there was none. So the example does not
answer my needs.
thanks
Sep 26 '07 #1
2 1598

"IfThenElse" <sq**********@hotmail.comwrote in message
news:uq*************@TK2MSFTNGP02.phx.gbl...
Hello,

I am wondering how can I Override/Append to the Client Side JavaScript of
a System.Web.UI.WebControls.RequiredFieldValidator Control.

I actually need to only add few lines of JavaScript to the Microsoft
Supplied JavaScript Function.

So I need to Just extend it to do one or two extra things for me.

I know I can create a new Validation Control to do such thing but I wonder
If I can Inherit the exiting functionality.

If I inherit the "System.Web.UI.WebControls.RequiredFieldValida tor" How
can I call the base class JavaScript that does the validation and then add
some more to it.

I have seen Scott Michell's "Creating Validator Controls for CheckBox"
etc... No inheritance because there was none. So the example does not
answer my needs.
I'm guessing, mind you, and have never done this, but from what I **just**
learned could you encapusate that validation control inside a user control
where you add what you need in the code-behind section?

Shelly
Sep 26 '07 #2

Shelly,

No, This is a built in server control
"System.Web.UI.WebControls.RequiredFieldValida tor"
I want to inherit it and add just functionality for the client side
JavaScript only but still calling the base-JavaScript-function that M.S.
provided.

encapsulate that validation control inside a user control will not work for
me. I am looking for a more elegant solution.

I can rewrite the entire control as
System.Web.UI.WebControls.MyRequiredFieldValidator but I was hoping to
inherit.

Thanks for you reply.

"Shelly" <sh************@asap-consult.comwrote in message
news:13*************@corp.supernews.com...
>
"IfThenElse" <sq**********@hotmail.comwrote in message
news:uq*************@TK2MSFTNGP02.phx.gbl...
>Hello,

I am wondering how can I Override/Append to the Client Side JavaScript of
a System.Web.UI.WebControls.RequiredFieldValidator Control.

I actually need to only add few lines of JavaScript to the Microsoft
Supplied JavaScript Function.

So I need to Just extend it to do one or two extra things for me.

I know I can create a new Validation Control to do such thing but I
wonder If I can Inherit the exiting functionality.

If I inherit the "System.Web.UI.WebControls.RequiredFieldValida tor" How
can I call the base class JavaScript that does the validation and then
add some more to it.

I have seen Scott Michell's "Creating Validator Controls for CheckBox"
etc... No inheritance because there was none. So the example does not
answer my needs.

I'm guessing, mind you, and have never done this, but from what I **just**
learned could you encapusate that validation control inside a user control
where you add what you need in the code-behind section?

Shelly

Sep 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Chris Barrow | last post: by
7 posts views Thread by A.M | last post: by
4 posts views Thread by TJS | last post: by
1 post views Thread by rmgalante | last post: by
1 post views Thread by Frankie | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.