Possible Duplicate:
Disabled button with a alert is clickable in IE8 (browser compatibility Issue in Asp.net website)

<asp:LinkButton ID="lnk_DeleteUser" ToolTip="Delete User" runat="server" OnClientClick="return confirm('Are you sure you want to delete this User?')">
<asp:ImageButton ID="Img_del" src="Styles/Images/icon_delete.png" OnClick="imgbtn_UserDeleteClick"
runat="server" Style="border-style: none" alt="Delete User" /></asp:LinkButton>
I want to disable the link button and image button for certain condition, but I am not able to disable the link button because when debugging I found the supports disabled attribute is false. because of that in IE8 the image is disable but the link button is not disabled and I am able to get the confirm popup.
this is the source code from browser
<a onclick="return confirm('Are you sure you want to delete this User?');" id="ctl00_MainContent_UserTable_ctl02_lnk_DeleteUser" title="Delete User" class="aspNetDisabled"><input type="image" name="ctl00$MainContent$UserTable$ctl02 $Img_del" id="ctl00_MainContent_UserTable_ctl02_Img_del" disabled="disabled" title="You don't have permission to delete users" class="aspNetDisabled" src="Styles/Images/icon_delete.png" alt="Delete User" src="" style="border-style: none" /></a>
This control does not support the disabled attribute.
You cannot magically tell it to support this attribute.
In particular, HTML does not have a
disabledattribute for links.