Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a usercontrol registered in master page. usercontrol has gridview control.
i want to show that usercontrol when user hover mouser over a div.
Posted

1 solution

You want to use jQuery, so here's an example showing you how to alter div elements on mouseover. If you want to explicitly specify new html elements on mouseover, use:

JavaScript
document.getElementById("yourDiv").innerHTML = "<HTML>your new stuff here</HTML>";


By the way, I Googled this and the answer came up at the top of the list. Get used to using Google first, before asking a question here.

- Pete
 
Share this answer
 
v7
Comments
sayed farhan 7-Oct-13 9:07am    
Thanks for reply pete.
but i want to bind a gridview control on hover with datatable which is in .ascx page with out calling a page load event
pdoxtader 7-Oct-13 9:28am    
Ok, well then you'll have to create it on load and hide it until someone mouses over it. You can play games with the div dimensions (set them to width:1px; height:1px), or use document.getElementById("yourDiv").style.display = 'none'; and document.getElementById("yourDiv").style.display = 'block';

By the way - it would really have helped if you had given that in your question description. You should think about updating the question... other people won't be as nice as I am, and will vote your question down because of it... leave you unpleasant comments... lol.

Give as much information as you can in the description, including any code you've written that you think you could use help with.

- Pete

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900