Thanks Bruce and Curt;
I don't think the vendor would really care (PayPal provides it for free in
their .NET SDK which is apparently unaware of validation and other
ASP.NET-specific features). I'd like to take a shot at making it happen as
you suggested was possible and I don't mind writing some code. I have never
extended an existing control, much less someone elses. Can you or someone
else here give me some high-level direction to cut down on some of the
research I'm going to do on this?
Apparently PayPal wouldn't care if we extended their stuff - as can be seen
from this thread in their free NG regarding same topic.
http://paypal.forums.liveworld.com/t...t=-1#100015819
Thanks
"Bruce Barker" <br******************@safeco.com> wrote in message
news:eD**************@TK2MSFTNGP12.phx.gbl...
you have to change the rendered html. the control is supposed to check the
if it causes validation and change its client postback code (by calling
GetClientValidatedPostback). so it should have rendered like:
<a id="_ctl0:_ctl2:MyButton"
href="javascript:{if (typeof(Page_ClientValidate) == 'function')
Page_ClientValidate())__doPostBack('_ctl0$_ctl2$My Button,'')}">
<img id="_ctl0__ctl2_MyButton" CausesValidation="True"
src="http://images.somesite.org/images/clickhere.gif" alt=""
border="0" />
</a>
-- bruce (sqlwork.com)
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:e9**************@TK2MSFTNGP10.phx.gbl...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$MyButto n,'')"><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!