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

Hover button

How can I declare a routine to occur when the mouse is "hovered" over a
certain button? I usually use Windows forms and I know how to there
(btn1_mouseover), but I do not see this in ASP. As you can tell, I am a new
one to ASP .NET.

Thanks for any information.

Brad
Nov 18 '05 #1
6 3348
You would need to do this via a client-side JavaScript since mouseOver is an
event triggered at the client level.
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
How can I declare a routine to occur when the mouse is "hovered" over a
certain button? I usually use Windows forms and I know how to there
(btn1_mouseover), but I do not see this in ASP. As you can tell, I am a new one to ASP .NET.

Thanks for any information.

Brad

Nov 18 '05 #2
Thanks for the information.

So the button objects I am using should be html buttons and not ASP objects.
"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
You would need to do this via a client-side JavaScript since mouseOver is an event triggered at the client level.
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
How can I declare a routine to occur when the mouse is "hovered" over a
certain button? I usually use Windows forms and I know how to there
(btn1_mouseover), but I do not see this in ASP. As you can tell, I am a

new
one to ASP .NET.

Thanks for any information.

Brad


Nov 18 '05 #3
well if you want a server side event handling them you will have to use the
button object and not html object.
but everything varies on client side.. so if you want things like hower then
you have to write additional javascript to do that

--
Regards,
HD
Once a Geek.... Always a Geek
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Thanks for the information.

So the button objects I am using should be html buttons and not ASP
objects.
"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
You would need to do this via a client-side JavaScript since mouseOver is

an
event triggered at the client level.
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> How can I declare a routine to occur when the mouse is "hovered" over a
> certain button? I usually use Windows forms and I know how to there
> (btn1_mouseover), but I do not see this in ASP. As you can tell, I am
> a

new
> one to ASP .NET.
>
> Thanks for any information.
>
> Brad
>
>



Nov 18 '05 #4
for a webserver control it would be
button1.attributes.add("onmouseover","somejavascri ptfunctionhere()");

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Thanks for the information.

So the button objects I am using should be html buttons and not ASP objects.

"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
You would need to do this via a client-side JavaScript since mouseOver is
an
event triggered at the client level.
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
How can I declare a routine to occur when the mouse is "hovered" over a certain button? I usually use Windows forms and I know how to there
(btn1_mouseover), but I do not see this in ASP. As you can tell, I am

a new
one to ASP .NET.

Thanks for any information.

Brad



Nov 18 '05 #5
I see that I can add btn1.attributes.add("onmouseover", "this.style...") to
the page_init of the .aspx.cs page. Where is this file found? I am not
locating it.

Thanks again for the information.

"Alvin Bruney [ASP.NET MVP]" <vapor at steaming post office> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
for a webserver control it would be
button1.attributes.add("onmouseover","somejavascri ptfunctionhere()");

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Thanks for the information.

So the button objects I am using should be html buttons and not ASP objects.


"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
You would need to do this via a client-side JavaScript since mouseOver is
an
event triggered at the client level.
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> How can I declare a routine to occur when the mouse is "hovered"

over a > certain button? I usually use Windows forms and I know how to there
> (btn1_mouseover), but I do not see this in ASP. As you can tell, I
am
a new
> one to ASP .NET.
>
> Thanks for any information.
>
> Brad
>
>



Nov 18 '05 #6
What file are you not locating? The .cs file? If you are using VS.NET, the
the .cs file (called the "Code Behind" file) is usually hidden from the
Solution Explorer view, but the file exists in the same directory as your
..aspx pages. The class in the code behind file is compiled into your
assembly so that when you deploy, you only need to copy your .aspx pages and
your assembly (.dll) and a few other supporting files, but the .cs files
don't need to be copied to the production machine.
"Brad" <ap**********@hotmail.com> wrote in message
news:eS**************@TK2MSFTNGP09.phx.gbl...
I see that I can add btn1.attributes.add("onmouseover", "this.style...") to the page_init of the .aspx.cs page. Where is this file found? I am not
locating it.

Thanks again for the information.

"Alvin Bruney [ASP.NET MVP]" <vapor at steaming post office> wrote in
message news:%2****************@TK2MSFTNGP09.phx.gbl...
for a webserver control it would be
button1.attributes.add("onmouseover","somejavascri ptfunctionhere()");

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Brad" <ap**********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Thanks for the information.

So the button objects I am using should be html buttons and not ASP objects.


"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
> You would need to do this via a client-side JavaScript since mouseOver
is
an
> event triggered at the client level.
>
>
> "Brad" <ap**********@hotmail.com> wrote in message
> news:%2****************@TK2MSFTNGP11.phx.gbl...
> > How can I declare a routine to occur when the mouse is "hovered"

over
a
> > certain button? I usually use Windows forms and I know how to

there > > (btn1_mouseover), but I do not see this in ASP. As you can tell,

I am
a
> new
> > one to ASP .NET.
> >
> > Thanks for any information.
> >
> > Brad
> >
> >
>
>



Nov 18 '05 #7

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

Similar topics

0
by: Don | last post by:
I have a client page that employs hover buttons. They work just fine in IE. But, when using Netscape, they intermittently won't display. When they don't display, all that shows is a gray box the...
5
by: Thomas Mlynarczyk | last post by:
Hello, I want to style an <a> element to have a special padding on "hover", like a {padding: 3px 5px 2px 4px;} a:hover {padding: 2px 4px 3px 5px;} No problem for Mozilla. Opera 7, however,...
8
by: JLahm | last post by:
I have defined a class for my images called .image that specifies the default border color, width and style. I'd like to be able to have the pseudo elements link, visited and active have one color...
1
by: StriderBob | last post by:
Why do buttons lock with the MouseEnter "Hover" image displayed when the Button is clicked and used to Hide the form the button is on in an mdi child form. Is this an event handler problem or a...
8
by: BobLaughland | last post by:
Hi There, Is there a way to cache button images in ASP .NET 2.0. What I have are buttons on my site which have 3 different images for 3 states, 1) Normal 2) Hover 3) Selected
7
by: KiwiBrian | last post by:
On a web page I have a graphic for a Shopping Cart Submit button. It is within a form and working fine. I would like to perform an image swap to an identical graphic of a different colour when I...
4
by: Israel Richner | last post by:
I know I can use <a></aand modify it's :hover and :visited appearance in my .css file. I'd like to know if I can do the same for a asp:button control. I'd like to do some processing of data in...
4
by: tomb | last post by:
In FF 2 and Netscape 7.2 this button works exactly as desired, and that is hovering anywhere over the button activates the hover action. But in IE 6, only mousing over the text of the link...
0
ThatThatGuy
by: ThatThatGuy | last post by:
This tutorial is intended to enlighten the power of XAML to build rich applications for Windows(WPF), Web(Silverlight) & Browser(XBAP). I will explain to you about building attractiveFading Glow...
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
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
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...

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.