G
Guadala Harry
I hope this is something I can solve without contacting the vendor:
I'm implementing a 3rd party component that will, by itself, initiate a
PostBack. Apparently it does not support the CausesValidation property - so
forms get posted back without any client-side validation. I know I can do
validation server side (and do anyway just as a good practice), but I want
this control (which is basically an ImageButton) to trigger client-side
validation.
This is how the 3rd party component appears in the rendered HTML (via View
Source from IE):
<a id="_ctl0:_ctl2:MyButton"
href="javascript:__doPostBack('_ctl0$_ctl2$MyButton,'')"><img
id="_ctl0__ctl2_MyButton" CausesValidation="True"
src="http://images.somesite.org/images/clickhere.gif" alt="" border="0"
/></a>
You can see that I added CausesValidation="True" but still no client side
validation.
FWIW: ASP.NET 1.1 and I'm using just the standard ASP.NET validators
(required field - nothing tricky). Also, on the same form I have a standard
asp:Button that, when clicked, does cause the validation as expected - so I
know that the validator is working as expected.
Thanks!
I'm implementing a 3rd party component that will, by itself, initiate a
PostBack. Apparently it does not support the CausesValidation property - so
forms get posted back without any client-side validation. I know I can do
validation server side (and do anyway just as a good practice), but I want
this control (which is basically an ImageButton) to trigger client-side
validation.
This is how the 3rd party component appears in the rendered HTML (via View
Source from IE):
<a id="_ctl0:_ctl2:MyButton"
href="javascript:__doPostBack('_ctl0$_ctl2$MyButton,'')"><img
id="_ctl0__ctl2_MyButton" CausesValidation="True"
src="http://images.somesite.org/images/clickhere.gif" alt="" border="0"
/></a>
You can see that I added CausesValidation="True" but still no client side
validation.
FWIW: ASP.NET 1.1 and I'm using just the standard ASP.NET validators
(required field - nothing tricky). Also, on the same form I have a standard
asp:Button that, when clicked, does cause the validation as expected - so I
know that the validator is working as expected.
Thanks!