HtmlImage and asp:Image servent onclick event

R

RKT

(CSharp, NET2.0)

Is there any way to EITHER:

1. Programmatically add a server onclick() event hander to the 'HtmlImage'
HtmlControl control?

OR

2. Programmatically preempt a 'Image' WebControl from invoking a postback?

I'll spare you the 'why' I need to do this, but (hint) if I could derive a
base class using a template arg (C++), problem would be solved...
 
K

Karl Seguin

No to both.

You can create a custom server control that inherits from either and
implements the functionality you want.

Also, you do have generics in 2.0 which are a lot like C++ templates.

Karl
 
R

RKT

Thank you for the pointer back to generics. I had searched for this when I
went to 2.0 and came to the conclusion it wasn't there - yet.

I'll try to craft better search strings this time. Any strong search term
you could add for the benefit of the newsgroup?
 
K

Karl Seguin

Not really, doing a basic google search for c# generics (or vb.net generics)
will result in heaps of hits...

Karl
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top