title: How to add EventHandler OnCommand for ImageButton programaticly?
body: <p>I have code, where i add ImageButton to table programaticly and I need to assign event handler to this ImageButton. When I write ASP/HTML code, there is attribute OnCommand, but in C#, there is nothing like this. Just CommandName and CommandAttribute.</p>
  
  <pre><code>ImageButton ib = new ImageButton
                       {
                           CommandName = "Edit",
                           CommandArgument = id.ToString(),
                           ImageUrl = "~/Images/icons/paper_pencil_48.png",
                           AlternateText = "Edit document"
                       };
  </code></pre>