Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CompositeControl & CustomValidator

Status
Not open for further replies.

Trebor100

Programmer
Mar 14, 2006
90
GB
Morning everyone,

I hope someone out there can help me here as I'm sure I'm slowley going mad! I'm trying to get a CustomValidator working on my CompositeControl. The control is being added fine during the CreateChildControls:

titleVal = new CustomValidator();
titleVal.Display = ValidatorDisplay.Dynamic;
titleVal.ServerValidate += new ServerValidateEventHandler(_titleValidate);
titleVal.ControlToValidate = titleList.ID;
this.Controls.Add(titleVal);

My _titleValidate is just about empty at the moment - i'm simply trying to see if it is ever called:

protected void _titleValidate(object source,ServerValidateEventArgs args)
{
string strA = "";
}

Can anyone point me in the correct direction? I've put a break point on strA which is never reached. What am I missing?

Thanks all.
Rob
 
Ignore this - blumin validate empty string was not set! DOH!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top