You cannot have it call server side code directly like that. What you can do is put an onclick="someJavaScriptFunction()" and then write some code in JS that could even call the server side.
Or, you can add a control with something like this:
Image img = new Image();
img.ID = whatever
...
table.Rows[x][y].Controls.Add(img);
This is from memory, but essentially if you are going to be adding via string then you need it to be an html control, not a server side control.