thể trùng lặp:
Disabling LinkButton doesn't disable the click event in javascriptLàm thế nào để tắt hoàn toàn nút liên kết?
Tôi có một linkbutton trong ASP.NET.
Tôi đã đặt thuộc tính của nó Đã bật = false;
<asp:LinkButton ID="lnkButton" runat="server"
Enabled = "false"
OnClientClick="return confirm('Are you sure ?')" > Click Me
</asp:LinkButton>
Suy nghĩ sự kiện Tôi đã đặt thuộc tính Enabled = false
sự kiện OnClientClick
vẫn được kích hoạt.
Làm cách nào để ngăn sự kiện OnClientClick
kích hoạt?
chào này có thể giúp bạn http: // weblog .asp.net/akjoshi/archive/2009/10/03/disable-linkbutton-hyperlink-and-imagebutton-complete.aspx và http: //www.aspnetajaxtutori này als.com/2009/05/how-to-enable-or-disable-linkbutton-in.html – PresleyDias
Cảm ơn nó hoạt động .... –
@PresleyDias: Sau đó đăng nó như một câu trả lời để Rajbir có thể chấp nhận nó. Hoặc xóa câu hỏi này Rajbir. –