V
vibs
I am getting the following error when dynamically adding
RequiredFieldvalidator control to a Table.
Multiple controls with the same ID '1' were found. FindControl requires that
controls have unique IDs
I get this error only on validator control and not on labels or textbox, so
if I was to replace the same control with a label or textbox, it works fine.
Here is the code,
case "RequiredFieldValidator":
RequiredFieldValidator cReq = (RequiredFieldValidator)ctrl;
cReq.ID = System.Guid.NewGuid().ToString();
mcell.Controls.Add(cReq);
break;
Thanks for your help!
Vibs
RequiredFieldvalidator control to a Table.
Multiple controls with the same ID '1' were found. FindControl requires that
controls have unique IDs
I get this error only on validator control and not on labels or textbox, so
if I was to replace the same control with a label or textbox, it works fine.
Here is the code,
case "RequiredFieldValidator":
RequiredFieldValidator cReq = (RequiredFieldValidator)ctrl;
cReq.ID = System.Guid.NewGuid().ToString();
mcell.Controls.Add(cReq);
break;
Thanks for your help!
Vibs