I fixed it by do this
VB Code:
Public Overrides Function toString() As String
Return ""
End Function
However, I am having a problem with the way it renders in the html.
When setting the font property of a control it renders like this
VB Code:
<asp:TextBox id=TextBox1 runat="server" [b]Font-Bold="True"[/b]></asp:TextBox>
but with my custom control it is rendering like this
Code:
<cc1:JHARequiredFieldValidator id=JHARequiredFieldValidator1 runat="server">
<UseRequiredValidator _UseRequiredValidator="True" ErrorMessage="test">
</UseRequiredValidator>
</cc1:JHARequiredFieldValidator>
The _UseRequiredValidator should be a property of the <cc1:JHARequiredFieldValidator> control, so it should render something like this
Code:
<cc1:JHARequiredFieldValidator id=JHARequiredFieldValidator1 runat="server" UseRequiredValidator-_UseRequiredValidator="True" UseRequiredValidator-ErrorMessage="This is the error message.">
</cc1:JHARequiredFieldValidator>
any ideas how to correct this?