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)
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)