How to remove link/href from linkbutton in asp.net

{0 Comments}

To remove a hyper link from link button From code behind, you can use following syntax at any code behind event. These will completely remove the herf attribute from link button and and stop redirecting on click of the same 

 C# |  copy code |? 
1
LinkButton1.Attributes.Remove("href");

Leave a Comment

Your email address will not be published.