473,405 Members | 2,421 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,405 software developers and data experts.

2.0: <asp:Image> click at server

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" Width="360" Height="280"
runat="server" />

which I need to handle when clicked. I tried:

protected void Page_Load(object sender, EventArgs e)
{
DotNETImage.Click += new EventHandler(DotNETImage_Click);
}
private void DotNETImage_Click(object sender, EventArgs e)
{
....
}

but it doesn't work of course because there's no Click event for
asp:Image.
Could you help me plase? I cannot find a solution in Internet.
Thank you very much!

/RAM/
Mar 18 '06 #1
4 1722
Why not use an ImageButton control instead?

"R.A.M." <r_********@poczta.onet.pl> wrote in message
news:bc********************************@4ax.com...
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" Width="360" Height="280"
runat="server" />

which I need to handle when clicked. I tried:

protected void Page_Load(object sender, EventArgs e)
{
DotNETImage.Click += new EventHandler(DotNETImage_Click);
}
private void DotNETImage_Click(object sender, EventArgs e)
{
...
}

but it doesn't work of course because there's no Click event for
asp:Image.
Could you help me plase? I cannot find a solution in Internet.
Thank you very much!

/RAM/

Mar 18 '06 #2
On Sat, 18 Mar 2006 14:54:45 -0800, "Ken Cox - Microsoft MVP"
<BA**********@hotmail.com> wrote:
Why not use an ImageButton control instead?


Thank you.
You are right (I am beginner).
Mar 20 '06 #3
I believe ImageButton does not allow Transparency of the image?
INPUT TYPE of Image draws opaque. What a mess.

Mar 31 '06 #4
what do you want to do?
Patrick

<br***********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
I believe ImageButton does not allow Transparency of the image?
INPUT TYPE of Image draws opaque. What a mess.

Apr 1 '06 #5

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

Similar topics

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...
13
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
0
by: DavidS | last post by:
I have HTML web page with <asp:Image id=img_L runat=server ImageAlign=Top Visible=True Width=y Height=x></asp:Image>. For some images, less than 128K I can view image. Other image files > 128K,...
4
by: Satya | last post by:
Hi all, The following code is throwing a run time error "The server tag is not well formed. " <ItemTemplate> <asp:HyperLink Runat="server" ID="lnkFile"...
11
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and...
3
by: jackiepatti | last post by:
QUESTION: I have a web page containing a form that contains an image instead of a submit button, e.g. <form name='myform' action='get' method='otherpage.asp'> <input type='image'...
1
by: MRW | last post by:
Hello! I'm taking a file name from a database and using the <asp:imagetag in GridView to show the image. However, some of the file names have spaces in it and no matter what I do, for example:...
3
by: MRW | last post by:
Hello! I'm taking a file name from a database and using the <asp:imagetag in GridView to show the image. However, some of the file names have spaces in it and no matter what I do, for example:...
2
Steve Kiss
by: Steve Kiss | last post by:
Is there a way to add javascript functionality, onmouseover to be specific, to an image defined with <asp:Image />?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.