473,545 Members | 2,788 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Could'nt Find MouseHover Event

I'm a user of Visual Studio Web Developer 2005 Express Edition & I use C# as
the language in it. So, the problem i'm facing is that I want to add a
MouseHover event to an image but i could'nt find it in the Events' list in
Properties window as in Microsoft Visual C# 2005 Express Edition.Can you tell
me where it lies or isthere any other way to do it in Web Developer. I'll be
thankful if you solve my problem.

Saurabh
Aug 23 '06 #1
3 1552
Hi Saurabh,

In the Web page, the mouseover event is a client event, so you won't find it
in C# server-side events. However, you can add the JavaScript code in
ASP.NET.

See the code sample below that demonstrates the technique.

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

<script runat="server">

protected void Page_Load
(object sender, EventArgs e)
{
ImageButton1.At tributes.Add("o nmouseover",
"this.src='http ://www.gc.ca/images/francaisbt.gif' ");
ImageButton1.At tributes.Add("o nmouseout",
"this.src='http ://www.gc.ca/images/englishbt.gif'" );
}
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>MouseOve r MouseOut Image</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:imagebutto n id="ImageButton 1" runat="server"
imageurl="http://www.gc.ca/images/englishbt.gif" /></div>
</form>
</body>
</html>
"Saurabh" <Sa*****@discus sions.microsoft .comwrote in message
news:67******** *************** ***********@mic rosoft.com...
I'm a user of Visual Studio Web Developer 2005 Express Edition & I use C#
as
the language in it. So, the problem i'm facing is that I want to add a
MouseHover event to an image but i could'nt find it in the Events' list in
Properties window as in Microsoft Visual C# 2005 Express Edition.Can you
tell
me where it lies or isthere any other way to do it in Web Developer. I'll
be
thankful if you solve my problem.

Saurabh


Aug 23 '06 #2
Hi Ken,
Thanks, it did work & this much programing I can do to modify it
according to my requirements. But i still want to know if it is possible
using C# in Web Developer.
Aug 23 '06 #3
Hi Ken,
I have another question. How can I change the picture of
onmouseover & onmouseout event. I mean can I import the picture file for my
website. It properly shows the picture which is on the internet but not the
one which is on my pc when i debug the web application.
Aug 23 '06 #4

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

Similar topics

3
2937
by: Professor Frink | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms application that is going to be used to extract data from a legacy system (VSAM based mainframe file structure), and output data in pipe-delimited...
3
2201
by: Liz Malcolm | last post by:
Hello and TIA for guidance. I am building a reusable search procedure (thanks go to Graham Thorpe for his example that set me on my way). Everything works up until the 2nd match is found, the command doesn't go to the third match, it exits out of the loop. I've read everything I could find in NG's, but I can't figure out where I'm going...
1
2746
by: Xiangliang Meng | last post by:
Hi, all. Recently, I find there is a way in our project to maintain a global set in many files by using preprocessing directives. I'm wondering if we could find a better method for this. Many colors are referred in different subsystems in our projects. They are defined as enumeration constants and a single color must be the same value...
8
4921
by: CJack | last post by:
hy, I have an mdi application, i create a child form and I want to know when a button is pressed while that child form is loaded. I have this code: private void frmTestBaby_KeyUp(object sender, System.EventArgs e) { MessageBox.Show("keyboard button pressed!"); } Following is the code to load the frmTestBaby
1
1841
by: poojapatel22 | last post by:
hi all, i had created a Windows NT service in VC 6.0 and i want to develop sasme thing in VC++.Net as per my Requirement. In VC 6.0 we get the Notification Like SERVICE_CONTROL_DEVICEEVENT by Registering through "RegisterDeviceNotification" and for that we r using RegisterServiceCtrlHandlerEx. i want to get same type of notification in...
1
1439
by: Saurabh | last post by:
I'm a user of Visual Studio Web Developer 2005 Express Edition & I use C# as the language in it. So, the problem i'm facing is that I want to add a MouseHover event to an image but i could'nt find it in the Events' list in Properties window as in Microsoft Visual C# 2005 Express Edition.Can you tell me where it lies or isthere any other way to...
1
1837
by: hypermommy | last post by:
Hi all, I have a problem that's got me just stumped. On my local machine (WinXPPro) my application runs just fine. But on the client's server (Win2003ServerStandard) when I try to pull up my default.aspx or login.aspx page, I get no error message but simply a plain white page that says "The system could not find the file specified". I...
3
1210
by: 13 | last post by:
Hello list, I have been searching the internet for python version 0.9.0 sources which had been posted to alt.sources list, but without any luck. Maybe someone has it available somewhere ? Thanks, Martins
0
1059
by: Kristijan Marin | last post by:
Hi, I have experianced same wierd behavior by one of my customers ..... Here is the thing .... We have the application for newspaper article management. so adding end editing etc .... After a while my customer started to complain that they have duplicate articles in there database ....
0
7499
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7432
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7943
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7786
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6022
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3490
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.