Create an aspx button :
asp:button text="Click Me" runat="server"
In the server side add the button client side functions.
btnOpen.Attributes.Add("onClick", "return false;");
btnOpen.Attributes.Add("onMouseOver", "mousemoveover();");
Javascript function to move the button
function mousemoveover()
{
var btn = document.getElementById("btnOpen");
var sHeight = screen.height - 400;
var sWidth = screen.width - 100;
btn.style.marginLeft = Math.floor(Math.random()*sWidth) + 'px';
btn.style.marginTop = Math.floor(Math.random()*sHeight) + 'px';
}
Captions
- Asp.Net (9)
- ASP.Net Tips (1)
- C# (7)
- Computer (1)
- Internet Explorer (5)
- Java Script (11)
- Shortcut Keys (4)
- SQL Programming - Common Mistakes (11)
- Sql Server (22)
- Sql Server Definitions (8)
- Sql Server Test (2)
- SSRS (2)
About Me
- Vasanth.S
- I'm just normal guy who like to travel, addicted to TV and Computer, Playing Computer Games and Watching Movies and many more. Have lot of idea and quote in life
My Blog List
-
-
Pass data from one page to another using post15 years ago