473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HtmlImage and asp:Image servent onclick event

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...

Dec 24 '05 #1
3 5152
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" <ss****@bellsouth.net> wrote in message
news:AQ******************@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...

Dec 24 '05 #2
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?
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:Oz**************@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" <ss****@bellsouth.net> wrote in message
news:AQ******************@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...


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

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX!

"RKT" <ss****@bellsouth.net> wrote in message
news:8f******************@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:Oz**************@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" <ss****@bellsouth.net> wrote in message
news:AQ******************@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...
>
>
>



Dec 24 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John Scott | last post by:
I am storing an image in an SQL database and have one field as an image datatype. I am also using a webservice to transport data. I want to be able to resize the image and pass back a thumbnail...
0
by: Daisy | last post by:
Is there any way in an ascx (without resorting to a codebehind file) to have a client-side onload event on an asp:image tag? I've just changed from a normal image, to an asp:image tag, but now it...
1
by: Chris Fink | last post by:
Hello, Does anyone know of a way to handle broken href image tags either by using the html img tag or the asp:image server control? For example, if my src attribute is broken, I would like to...
1
by: xanthviper | last post by:
Hey there, I'm kind of stumped on this and hopefully someone can guide me in the right direction. I have a webform that I am developing in C# using ASP.NET 2.0. On the page_load, I am...
1
by: R.A.M. | last post by:
Hello, Could you help me please with a problem concerning handling at server asp:Images? I have <asp:Image ID="DotNETImage" ImageUrl="Images/DotNET_360x280.jpeg" AlternateText="Microsoft .NET...
4
by: R.A.M. | last post by:
Hello, Could anyone help me to handle <asp:Image> click in behind code? I have: <asp:Image ID="DotNETImage" ImageUrl="Images/DotNET_360x280.jpeg" AlternateText="Microsoft .NET version 2.0"...
4
by: mc | last post by:
Scenario: I have a database of companys, and a directory of images, each image has the name of one of the companys, although not all companys have images. I want a page which displays the...
4
by: Deere | last post by:
When I try to take a database field and change it with a function and return it...it will not display the image. The "Imageurl" does not convert to "src=" but stays as ImageUrl. id=Image2 will...
0
by: Christian Schlemmer | last post by:
hi, in a DetailsView i have a image display. images i want to store in a seperate directory, but it a path is added to Bind update and delete is not working. just Bind makes my...
3
by: Paul Cheetham | last post by:
Hi, I have an application that will display user-defined images in some asp:image controls. (sets the ImageURL, and is always built from the site root) The problem comes when the images...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.