Custom WebControl.

G

George Ter-Saakov

Hi. I am writing my own Validation control to validate the length of the
inputted string. Use RegExp seems to me an overkill for such simple task.

Anyway I declared my control as

public class GLengthValidator : WebControl, IValidator

Then I overwrote the Render method

protected override void Render(HtmlTextWriter writer)
{
if( _isValid )
return; //do not output anything if it's valid.
else
writer.Write("This is a tesT"); //show something if it's invalid.
}

The thing is that in VS when i place control on form it shows
[GLengthValidator "GLengthValidator1"]

What should i do to show my own staff during the design time?

Thanks.
George.
 

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

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top