For a button or imagebutton added programatically in C#, I'd go:
Expand|Select|Wrap|Line Numbers
- ImageButton im = new ImageButton();
- im.ImageUrl = "~/images/"+p_row.ItemArray[2].ToString();
- im.CausesValidation = false;
- im.Click += new ImageClickEventHandler(im_Click);
- tc.Controls.Add(im);
Note: The validator is on the masterpage and the button in a ContentPlaceHolder; I don't think it matters at all but just in case.