Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2005, 07:40 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Default mouseover on label

Working on asp.net Want to display some msg on mouseover on a lable.I dont want to use tooltip.
how to find label id in runtime?advice me.

System.Web.UI.WebControls.Label lbl1 = (System.Web.UI.WebControls.Label);
msg="Invalid text........";

onmouseover of lbl1 want to display msg.
lbl1 .Attributes.Add("onMouseover", "????")
 
Old July 8th, 2005, 09:48 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you want to display the message in a client alert messagebox you can use this:

lbl1.Attributes.Add("onMouseover", alert('" & msg & "')")

Be careful with characters in the message that might break the HTML quote sequence.

-Peter
 
Old July 8th, 2005, 09:48 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Oops... missed a quote!

lbl1.Attributes.Add("onMouseover", "alert('" & msg & "')")
 
Old February 2nd, 2007, 01:53 PM
Registered User
 
Join Date: Feb 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a similar issue. I am trying to do a onmouseover for both a label and an image box in the code behind. I need the onmouseover to display a menu. I have the menus and such all set up, but the onmouseover doesn't seem to be working. How can I set it up to call the code to create the menu?

THanks.

 
Old February 8th, 2007, 10:20 AM
Authorized User
 
Join Date: Dec 2005
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to g_vamsi_krish
Default

I too agree with Peter. We need to use java script. Needs to add the script on pageload event.

Thanks
Vamsi.



vamsi Krishna G
mobile: 91 + 9986023966.
124 Puttappa layout new Tippasandhra,
bangalore.
Inida
 
Old February 8th, 2007, 10:27 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:
vamsi Krishna G
mobile: 91 + 9986023966.
124 Puttappa layout new Tippasandhra,
bangalore.
Inida
Hey Krishna

Don't mind, but atleast represent our country name properly in your signature. I know the pride of being an Indian.

(Friends forgive me for this personal comment here)

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP:Repeater and Mouseover gbrown ASP.NET 1.0 and 1.1 Basics 1 June 4th, 2007 01:17 AM
Q: JButton with Mouseover and sound kifissia Java Basics 1 March 16th, 2007 06:38 AM
Form flashes when I mouseover an unbound Label? wayne62682 Access 4 March 29th, 2006 11:11 AM
HTML Table and Mouseover itHighway Javascript How-To 4 January 30th, 2006 02:05 PM
oPacity Mouseover crmpicco Javascript How-To 3 July 1st, 2005 09:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.