welcome Netizen

Share Your Knowledge.It is a way to achieve immortality

Wednesday, October 3, 2012

How to blink LinkButton or label controls in

Here I would like to share the code recently I searched more on Google…it’s a simple process to blink or flash a linkbutton in using JavaScript.

It’s a small trick to virtually to show linkbutton like blink in page..
Steps to follow:
1. Initially add linkbutton or label controls on the client side.
2. Call the JavaScript on body onload function.
3. In JavaScript mention the control name to blink.
<script type="text/javascript">

        function Blink() {

            if (document.getElementById("BlinkMe"))
            //Here you have to mention control name instead of blinkme

                var d = document.getElementById("BlinkMe");
                //Here you have to mention control name instead of blinkme

       = ( == 'maroon' ? 'white' : 'maroon');

                setTimeout('Blink()', 1000);



<body onload ="Blink()">
  <asp:LinkButton ID="BlinkMe" runat="server">Reset</asp:LinkButton>

That’s it now you can run your code …see the magic the linkbutton should blink. Actually in code we just change the link button color to white, but it seems to blink.
Happy coding…………


Post a Comment