Wednesday, 21 January 2015

How to disable link of LinkButton using javascript ?


var  DemoLink = document.getElementById("ctl00_ContentPlaceHolder_lbnDemo");

                or 
var  DemoLink = document.getElementById("lbnDemo.ClientID");
     if ( DemoLink  != null)
         {
           DemoLink .href = "javascript:__return false";
         }

No comments:

Post a Comment