A
Andy
Hi folks,
I have a customvalidator control that works properly if it isn't
contained in an ASP:TABLE. But, when I place it inside an ASP:TABLE, I
find that _ServerValidate doesn't get fired, even if I force the
customvalidator to validate by invoking its validate() method after a
button is clicked:
cvCustomValidator_ServerValidate(object source,
system.Web.UI.WebControls.ServerValidateEventArgs args) <== doesn't get
called
<asp:table id="tblTable" runat="server" Width="100%">
<asp:TableRow>
<asp:TableCell>
<asp:TextBox runat="server" Width="400px" Font-Names="Verdana"
ID="txt_textbox"></asp:TextBox>
<asp:CustomValidator runat="server" ControlToValidate="txt_textbox"
ErrorMessage="This is an error"
ID="cvCustomValidator" Visible="true" Display="Static"
EnableClientScript="false" Enabled="true"
EnableViewState="true">*</asp:CustomValidator>
</asp:TableCell>
</asp:TableRow>
</asp:table>
I don't have any client-side validation set for the validator, and when
I run a test, I key characters into the textbox. I know the
servervalidate method isn't being called because I write to a log from
inside ServerValidate when its called.
Does anyone know what's going wrong?
Is there some parameter I have to set to enable the validator to work
from inside an ASP:TABLE?
Andy
I have a customvalidator control that works properly if it isn't
contained in an ASP:TABLE. But, when I place it inside an ASP:TABLE, I
find that _ServerValidate doesn't get fired, even if I force the
customvalidator to validate by invoking its validate() method after a
button is clicked:
cvCustomValidator_ServerValidate(object source,
system.Web.UI.WebControls.ServerValidateEventArgs args) <== doesn't get
called
<asp:table id="tblTable" runat="server" Width="100%">
<asp:TableRow>
<asp:TableCell>
<asp:TextBox runat="server" Width="400px" Font-Names="Verdana"
ID="txt_textbox"></asp:TextBox>
<asp:CustomValidator runat="server" ControlToValidate="txt_textbox"
ErrorMessage="This is an error"
ID="cvCustomValidator" Visible="true" Display="Static"
EnableClientScript="false" Enabled="true"
EnableViewState="true">*</asp:CustomValidator>
</asp:TableCell>
</asp:TableRow>
</asp:table>
I don't have any client-side validation set for the validator, and when
I run a test, I key characters into the textbox. I know the
servervalidate method isn't being called because I write to a log from
inside ServerValidate when its called.
Does anyone know what's going wrong?
Is there some parameter I have to set to enable the validator to work
from inside an ASP:TABLE?
Andy