Access to onclick events of button controls within dynamically created table + adding linked image t

H

Hrvoje Vrbanc

Hello all,

I have a table created programatically from within a Codebehind file. Now,
I would like to either of those two things:

a) put images into the table but the images should be linked. I managed to
add Image controls into table cells easily (cell.controls.add(ImageName))
but have no idea how to make them serve as links.

b) put ImageButtons instead of images. In this case, how to access the
onClick events of those buttons as they are dynamically created and put into
dynamically created table? I don't have idea what event to use. Also, I
cannot remove the style for those buttons (set in CSS file and linked to the
ASPX file). ImageButton1.Style.remove or Clear doesn't seem to work - button
is still formatted as specified for INPUT tag in the CSS....

Many thanks,
Hrvoje
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top