Seemingly no rhyme or reason to event handler
Posted on 2008-10-21
I have a link button that I am signing-up for (to respond to its click-event) in Page_Init:
protected void Page_Init( object sender, EventArgs e )
this.ReturnLinkButton.Click += null;
this.ReturnLinkButton.Click += new EventHandler(ReturnLink_Click);
protected void ReturnLink_Click(object sender, EventArgs e)
WorkflowSessionManager.CurrentContext.DisplayOverride = null;
Sometimes when I click on the Link Button the event fires and the handler is entered. Then I'll click it again and nothing happens.
What can I do to ensure that a click on the Link Button will always get handled?