M
Morten
Hi!
I've been experimenting with server side custom validation and I can't make
it work.
I have a text box which I'd like to validate by sending the content to a web
service which will check it and return 0 or 1. I've added a custom validator
control in VS .Net 2003. The code looks like this:
<asp:CustomValidator id="CustomValidator1" runat="server"
ControlToValidate="CVRNummer" ErrorMessage="TEST"></asp:CustomValidator>
By double-clicking the control the follwoing was added in the code-behind
file:
private void CustomValidator1_ServerValidate(object source,
System.Web.UI.WebControls.ServerValidateEventArgs args)
{
}
I've tried to add all sorts of things to this Sub to make something happen
but so far nothing has worked. My last attempt was this:
private void CustomValidator1_ServerValidate(object source,
System.Web.UI.WebControls.ServerValidateEventArgs args)
{
Label3.Text = "TEST";
}
which unfortunately didn't give me the expected result. Can someone help me
out here?
Best regards
Morten
I've been experimenting with server side custom validation and I can't make
it work.
I have a text box which I'd like to validate by sending the content to a web
service which will check it and return 0 or 1. I've added a custom validator
control in VS .Net 2003. The code looks like this:
<asp:CustomValidator id="CustomValidator1" runat="server"
ControlToValidate="CVRNummer" ErrorMessage="TEST"></asp:CustomValidator>
By double-clicking the control the follwoing was added in the code-behind
file:
private void CustomValidator1_ServerValidate(object source,
System.Web.UI.WebControls.ServerValidateEventArgs args)
{
}
I've tried to add all sorts of things to this Sub to make something happen
but so far nothing has worked. My last attempt was this:
private void CustomValidator1_ServerValidate(object source,
System.Web.UI.WebControls.ServerValidateEventArgs args)
{
Label3.Text = "TEST";
}
which unfortunately didn't give me the expected result. Can someone help me
out here?
Best regards
Morten