Upps, please forget the question. It has nothing to do with iron-python.
in asp.net you always have to bind dynamic event-handlers in Page_Init or Page_Load handlers. Must be done that way always Kind regards Bernd 2013/3/29 Bernd Viehmann <[email protected]> > Hello, > > I am working on a ASP.NET web-application written in IronPython. I have > to create some widgets dynamically in the code-behind file. > > Unfortunately the Click-Handler is not called when i click a > dynamic-created LinkButton. > > Here is the code: > > ------------------------------------------... > # add a linkbutton to the webform > lnkBtn = LinkButton() > lnkBtn.Text = itm[0] > lnkBtn.ID = 'hyLnk_tagg_' + System.Convert.ToString( iCnt ) > lnkBtn.EnableViewState = False > lnkBtn.CssClass = > lnkBtn.Click += HandleTaggLink > ... > > def HandleTaggLink( sender, e ): > try: > urlNext = None > > tool.log.w2lgDvlp( 'HandleTaggLink called in topic_display_taggs ' > + sender.ID ) > > except Exception,e: > tool.log.w2lgError(traceback.format_exc()) > > if urlNext != None: > Response.Redirect( Page.ResolveUrl( urlNext ) ) > > > > ------------------------------------------ > Some idea what went wrong? > > Regards > > Bernd > -- Mit freundlichen Grüßen Bernd Viehmann Mahrweg 46 41836 Hückelhoven Tel.: 02433 9640 100 Fax: 02433 9640 109
_______________________________________________ Ironpython-users mailing list [email protected] http://mail.python.org/mailman/listinfo/ironpython-users
