How can use Mouse over and mouse leave event in button in asp.net

Posted by Sekar.C under ASP.NET on 4/16/2012 | Points: 10 | Views : 39077 | Status : [Member] | Replies : 15
Hi,
How can use Mouse over and mouse leave event in button in asp.net
Regards
Sekar.c

Regards
Sekar.c



Responses

Posted by: Kk86kiran on: 4/16/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

If you dont want to use button click event you can use mouse over & leave events for particular task. For example if u want retrieve data with out using button click event u can use mouse leave event and if u want to show any message with out using click event u can use mouse over event.

By combing the above examples in one is if u want to to retrieve data from database and before retrieving it u want to a message for retrieving. In this situation u can use mouse over for showing message and mouse leave event for retrieving data

k.m.j.kiran

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sekar.C on: 4/16/2012 [Member] Starter | Points: 25

Up
0
Down
pls sent sample code

Regards
Sekar.c

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/16/2012 [Member] Silver | Points: 25

Up
0
Down
for mouse over..

http://forums.asp.net/t/944249.aspx/1?GridView+and+MouseOver+with+ASP+NET+2+0+missing+itemdatabound

Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/16/2012 [Member] Silver | Points: 25

Up
0
Down
See this link with screen shot also there...

http://aspdotnetcodebook.blogspot.in/2011/06/how-to-enlarge-image-on-mouseover-in.html

Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/16/2012 [Member] Bronze | Points: 25

Up
0
Down
Check this link

http://www.dreamincode.net/forums/topic/108111-mouseleave-on-a-panel/

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/16/2012 [Member] Bronze | Points: 25

Up
0
Down
public Form1()

{
InitializeComponent();
button1.MouseEnter += new EventHandler(button1_MouseEnter);
button1.MouseLeave += new EventHandler(button1_MouseLeave);
}

void button1_MouseLeave(object sender, EventArgs e)
{
this.button1.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.img1));
}


void button1_MouseEnter(object sender, EventArgs e)
{
this.button1.BackgroundImage = ((System.Drawing.Image)(Properties.Resources.img2));
}


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/16/2012 [Member] Bronze | Points: 25

Up
0
Down
Moverover in Jquery

Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element.
For example, consider the HTML:

<div id="outer">
Outer
<div id="inner">
Inner
</div>
</div>
<div id="other">
Trigger the handler
</div>
<div id="log"></div>



$('#outer').mouseover(function() {

$('#log').append('<div>Handler for .mouseover() called.</div>');
});

Now when the mouse pointer moves over the Outer <div>, the message is appended to <div id="log">. We can also trigger the event when another element is clicked:

$('#other').click(function() {
$('#outer').mouseover();
});


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/16/2012 [Member] Bronze | Points: 25

Up
0
Down
In javaScript

http://www.quirksmode.org/js/events_mouse.html

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/16/2012 [Member] Silver | Points: 25

Up
0
Down
Refer this...

http://weblogs.asp.net/dwahlin/archive/2009/04/13/handling-mouseenter-and-mouseleave-events-in-jquery.aspx

Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/16/2012 [Member] Silver | Points: 25

Up
0
Down
see this link..

http://www.dart.com/help/pwlc/Dart.PowerWEB.LiveControls~Dart.PowerWEB.LiveControls.LiveButton~MouseLeave_EV.html

Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/16/2012 [Member] Bronze | Points: 25

Up
0
Down
Sakthi.Singaravel

http://www.dart.com/help/pwlc/Dart.PowerWEB.LiveControls~Dart.PowerWEB.LiveControls.LiveButton~MouseLeave_EV.html


This Code is Not Working,,,

Can you Check and say.. Plz..

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/19/2012 [Member] Silver | Points: 25

Up
0
Down
okay

Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/19/2012 [Member] Silver | Points: 25

Up
0
Down
Hi Sekar,

See this article..

http://nareshkamuni.blogspot.in/2012/04/how-to-change-image-when-mousehover-and.html

Regards,
Singaravel M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Refer this below link it helps u a lot

http://msdn.microsoft.com/en-us/library/7ytf5t7k.aspxhttp://msdn.microsoft.com/en-us/library/7ytf5t7k.aspx

------------------------------------------------
Learn throughout life

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 4/19/2012 [Member] Bronze | Points: 25

Up
0
Down
Sakthi.Singaravel

don't mind anything man...

i just tried that code ..

its not working..


Thats y



Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response