Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 2
    Having OnClick and Handles means you're trying to hook it up twice - once from the code behind, and once from the HTML. If you switch to Protected, you'll find that the event handler is invoked twice (as you currently have it). Remove the OnClick in the HTML Commented Jun 14, 2013 at 12:50
  • I just tried to add "Hanldes" after I saw the compile error. I get same compile error with or without the Handler keyword.
    – S Nash
    Commented Jun 14, 2013 at 12:55
  • I said remove the OnClick in the HTML, not the Handles. Commented Jun 14, 2013 at 12:55
  • This situation is very simple to replicate. Anyone can setup and replicate the above scenario in 2 minutes.
    – S Nash
    Commented Jun 14, 2013 at 12:56
  • If I remove the OnClick then, it is like I have dragged 2 button to my form from the toolbox(codewise). I wanted to know why one of these works with private and otherone needs Protected.
    – S Nash
    Commented Jun 14, 2013 at 13:02