473,385 Members | 1,320 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,385 software developers and data experts.

making image click fire codebehind function?

have an image (acting like a button) currently that has onMouseOver
and onMouseOut events. want to make this accessible to the codebehind
with a click event.
was able to right click at and choose "run as server control", when i
double click it then to put code in the codebehind, there is no
function there for me to fill in. i made up one called goButton_Click
and handles gobutton.click
that didn't work, didn't recognize the name i gave it or click event
(don't remember which).
if i was to change it to a vb.net imagebutton, then i'd loose the
onMouseOver and onMouseOut events.

is there a way to have an image have the onMouse events and upon
clicking be handled by a codebehind function? i'm sure there is,
seems like a pretty standard process, just haven't put the pieces
together yet. ugh
(this is in a user control, ascx, by the way)

thanks for any help and an example would be great!

Feb 5 '06 #1
4 1926
Simon,

It is easier to use Image Buttons for this kind of things.

You only have to know it.

I hope this helps,

Cor
Feb 5 '06 #2
thanks, i think i tried that, not sure been trying so many new things
lately. but one of the issues with using something like that was that
i was not sure how to give the onMouse commands within the tag. lots
of squigglies come up if i'm not mistaken, which makes me a little
nervous to see them in the code
Simon,

It is easier to use Image Buttons for this kind of things.

You only have to know it.

I hope this helps,

Cor


Feb 5 '06 #3
Hi,

Not sure if this the best method but you can use ajax to call a
function in the code behind with javascript.

http://www.vb-tips.com/default.aspx?...d-73214b27750c

Ken
--------------------------------

"simon" wrote:
thanks, i think i tried that, not sure been trying so many new things
lately. but one of the issues with using something like that was that
i was not sure how to give the onMouse commands within the tag. lots
of squigglies come up if i'm not mistaken, which makes me a little
nervous to see them in the code
Simon,

It is easier to use Image Buttons for this kind of things.

You only have to know it.

I hope this helps,

Cor


Feb 5 '06 #4
Simon,

You can add to every control attributes using VBNet.

http://msdn2.microsoft.com/en-us/lib...ttributes.aspx

I hope this helps,

Cor

"simon" <me@here.com> schreef in bericht
news:l2********************************@4ax.com...
thanks, i think i tried that, not sure been trying so many new things
lately. but one of the issues with using something like that was that
i was not sure how to give the onMouse commands within the tag. lots
of squigglies come up if i'm not mistaken, which makes me a little
nervous to see them in the code
Simon,

It is easier to use Image Buttons for this kind of things.

You only have to know it.

I hope this helps,

Cor

Feb 5 '06 #5

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

Similar topics

4
by: Csaba2000 | last post by:
I want to be able to programatically click on the center of an <INPUT type=image ...> element (I only care about IE 5.5+). This should work regardless of whether IE has focus. Normally you would...
0
by: Greg Christie | last post by:
I think I have a somewhat unique situation here, so I thought I should post it for the few poor souls who run across it and try to google it like I did. First of all, I was getting the following...
3
by: Fred R | last post by:
I'm designing an app in Access 97 that will facilitate the uploading of records and images to a website. The user selects the image thumbnails from the file system and drags them into the app....
3
by: Epetruk | last post by:
Hi, I'm trying to design a simple web form, but I cannot get the code in the btnSubmit_ServerClick event to fire. What am I doing wrong? Here's the codebehind: using System; using...
0
by: H Branyan | last post by:
Scenario: When a user submits the form by clicking one button (ButtonA), I want to fire the click event for another button (ButtonB). I created a javascript function first to the webform:...
3
by: Simon Harris | last post by:
Hi All, I have a data grid which displays country names. I now wish to display the country flag images above the names. Can someone please advise how I display an image in a datagrid? I have a...
2
by: moondaddy | last post by:
I need to get the size on an image client side before the client uploads it, and if its too large, I need to alert the client rather than doing a postback. The code below successfully writes the...
3
by: jens.buchta | last post by:
Hi! I'm using a DataGrid with a template column to display an Image inside of it. I'm hooking into its OnPrerender-Event to set the ImageURL-Property dynamically. Everything works just fine...
5
by: Vili | last post by:
Hi all I am having a problem here Is it possible to fire a server side function from client side? ie. I have a function on codebehind Sub DoSomething(o as object)
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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: 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...

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.