V
vibs
I am adding a textbox and a requiredvalidator control dynamically to a
usercontrol, and I get this error on the validator control. I have tried
changing to ClientID and UniqueID with no success. What am I missing? I am
adding the control to the same TableCell so the container should be the same.
Unable to find control id 'TaskNotesID$' referenced by the
'ControlToValidate' property of 'TaskNotesID$Required'
case "TextBox":
TextBox cTextBox = (TextBox)ctrl;
cTextBox.Text = "Test";
mcell.Controls.Add(cTextBox);
RequiredFieldValidator mReq = new RequiredFieldValidator();
mReq.ControlToValidate = cTextBox.ID;
mReq.ErrorMessage = "Error";
mReq.Text = "*";
mcell.Controls.Add(mReq);
Thanks!
Vibs
usercontrol, and I get this error on the validator control. I have tried
changing to ClientID and UniqueID with no success. What am I missing? I am
adding the control to the same TableCell so the container should be the same.
Unable to find control id 'TaskNotesID$' referenced by the
'ControlToValidate' property of 'TaskNotesID$Required'
case "TextBox":
TextBox cTextBox = (TextBox)ctrl;
cTextBox.Text = "Test";
mcell.Controls.Add(cTextBox);
RequiredFieldValidator mReq = new RequiredFieldValidator();
mReq.ControlToValidate = cTextBox.ID;
mReq.ErrorMessage = "Error";
mReq.Text = "*";
mcell.Controls.Add(mReq);
Thanks!
Vibs