Catch an event from a control inside InfoWindowTemplate

Nov 22, 2009 at 9:52 PM
Edited Nov 22, 2009 at 9:55 PM

Hi

Does anybody know how to catch an event from a control inside a Marker's InfoWindowTemplate? (Version 4.0.1)

For instance if you have a linkbutton inside the template how to catch the click event (clientside or serverside) and what are the possible event arguments?

The linkbutton is causing a postback so it must be possible to catch the event on the serverside

Is there a way to prevent the postback and catch the event only clientside? with what eventargs?

Thanks in advance,

Rick

 

Mar 12, 2010 at 1:52 PM

Rick,

This is an old thread, but my guess is that your template isn't being re-created on postback, and so the event isn't getting wired up.  Dynamically-created controls need to be recreated on postback manually so that the events can fire.  I am working on this now as well.

Mark

 

Mar 18, 2010 at 1:05 PM

I didn't read you question properly, but if you want to catch the event only on the client side, instead of adding a linkbutton, just add a html link like this:

 

<a href="javascript: myFunction(); return false;">Click me</a>