As the title says. What could be amiss?
I have a regular TextBox on my page - <asp:TextBox ID="tb" runat="server" />
The following works:
<asp:RequiredFieldValidator ID="r" runat="server" ControlToValidate="tb" ErrorMessage="error" />
The following does not work:
RequiredFieldValidator rfv = new RequiredFieldValidator();
rfv.ID = "rfv";
rfv.ControlToValidate = tb.ID;
rfv.ErrorMessage = "error";
you need to add your required field validator