|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
HtmlImage and asp:Image servent onclick event(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... 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 -- Show quoteMY ASP.Net tutorials http://www.openmymind.net/ http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX! "RKT" <ssa***@bellsouth.net> wrote in message news:AQ0rf.29773$k76.1456@bignews6.bellsouth.net... > (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... > > > 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? Show quote "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> wrote in message news:Oz2JloCCGHA.4040@TK2MSFTNGP12.phx.gbl... > 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 > > -- > MY ASP.Net tutorials > http://www.openmymind.net/ > http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX! > > > > "RKT" <ssa***@bellsouth.net> wrote in message > news:AQ0rf.29773$k76.1456@bignews6.bellsouth.net... > > (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... > > > > > > > > Not really, doing a basic google search for c# generics (or vb.net generics)
will result in heaps of hits... Karl -- Show quoteMY ASP.Net tutorials http://www.openmymind.net/ http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX! "RKT" <ssa***@bellsouth.net> wrote in message news:8fbrf.17707$kP5.9318@bignews5.bellsouth.net... > 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? > > > "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net> > wrote in message news:Oz2JloCCGHA.4040@TK2MSFTNGP12.phx.gbl... >> 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 >> >> -- >> MY ASP.Net tutorials >> http://www.openmymind.net/ >> http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX! >> >> >> >> "RKT" <ssa***@bellsouth.net> wrote in message >> news:AQ0rf.29773$k76.1456@bignews6.bellsouth.net... >> > (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... >> > >> > >> > >> >> > > |
|||||||||||||||||||||||