Disable HTML Anchor link using CSS

ramco1917
 
on Mar 22, 2022 10:47 PM
683 Views

Hi

  In below code i want to disable Delete button

                        htmlTable.Append("<td class='text-center'><a id='btnEdit' class='list-icons-item text-primary-600'  data-container='body' href='Invoice?val=" + AES.Encrypt(colum.ID.ToString()) + "&AU=U" + "'><i class='icon-pencil7 mr-2'></i></a> <a id='btnDel' style='cursor: pointer;' class='list-icons-item text-danger-600' data-toggle='modal' data-target='#modal_Delete' onclick='BindData(this);'><i class='icon-bin'></i></a></td>");

Thanks

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Mar 23, 2022 03:12 AM
on Mar 23, 2022 03:13 AM

Hi ramco1917,

There is no disabled attribute for anchor tag. If you don't want something to be linked then you'll need to remove the anchor tag altogether or you can set the href attribute to javascript:void(0).

<style type="text/css">
    .disabled {
        color: black;
    }
</style>
<a class="disabled" href="javascript:void(0)">ASPSnippets</a>

Demo