Date parsed: 05/10/2007 13:20:27
Date: Fri, 5 Oct 2007 19:20:27 -0600
Elroyskimms,
> At first glance, it looks like your imgAddToCart_Click method is not
> bound to the click event of the button. In VB.net, you would declare
> the method:
>
> protected sub imgAddToCart_Click(object sender, ImageClickEventArgs e)
> handles imgAddToCart.Click
>
> Notice the _handles imgAddToCart.Click_ after the method declaration.
>
> I use the OnClick HTML attribute when I want the button to call some
> client-side Javascript before firing the server-side Click event.
If I'm not mistaken, server-side controls use the OnClientClick property to
specify javascript.
According to
http://www.velocityreviews.com/forums/t367616-using-quothandlesquot-vb-vs-c.html, C# doesn't have anything like Handles. But I did find discussions about
AutoEventWireup, which seems to be related.
Unfortunately, I was unable to find clear documentation on AutoEventWireup
and how it applies to a master page, and I found conflicting information
about its default value. I tried AutoEventWireup="true", both in my Master
directive and also in the DOCTYPE tag. Neither seems to have any effect.
Thanks.
Jonathan