How to learn the base class: RequiredFieldValidator?

J

Joel Finkel

Folks,

I am trying to extend the RequiredFieldValidator control. What I am trying to accomplish should be mindlessly simple: if the ControlToValidate is valid, output an OkayMessage that is rendered in the Font and Style that has been specified for it in the Property Editor.
It requires that the Style["visibility"] is always set to "show".

Research with the debugger shows that, unfortunately, the visibility is set in the control's Render method. Therefore I cannot simply override the method in this manner:

protected override void Render(HtmlTextWriter output)
{
this.Style["visibility"] = "show";
base.Render(output);
// visibility has been reset to "hidden"!
}

This means that I have to override the RenderContents method...probably. Herein lies my question. How do I discover what method I really need to override. How do I discover how the base class actually works? Without knowing this information, how can I possible extend it?

Thanks in advance for any suggestions!

Joel Finkel
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top