LargeItem.ClientClick

Mar 17, 2011 at 4:54 AM

Does anyone have any suggestions on how to suppress the postback event on a client click event?

I have a context menu i have created from code and have a statement  ItemColumnSelector.ClientClick = "Item_ColumnSelector_Click" which seems to fire when clicked but is not running the javascript on the page as I suspect the page is posting back and thus does not yet exist.

Alternatlvely if there are examples of how to correctly apply the ClientClick property, answers on a postcard...

Many thanks, Ken.

Coordinator
Mar 17, 2011 at 6:52 AM

Hi,

you can cancel page postback this way :

MyItem.ClientClick = "MyFunction(); return false;"

 

Bye

Sébastien

Mar 17, 2011 at 7:01 AM

Sébastien,

Thanks that worked first time, looking at it now probably qualifies me for the dumb question of the week award! but thanks for your time never the less... ;-)

Ken