Why are linkbuttons not grayed out when disabled in FireFox?

后端 未结 5 1686
星月不相逢
星月不相逢 2021-02-06 02:39

Why when I set enabled=false on a button does it not render correctly in Firefox? Instead of graying out the link it is still blue.

[UPDATE]

ASP.net already rem

5条回答
  •  执念已碎
    2021-02-06 03:12

    From W3Scholl, "Enabled" Property isn't standard property of XHTML 4(It's Microsoft standard.). You should remove href property from hyperlink or using my following code

    // cancel click event.
    LinkButton1.Attributes["OnClick"] = "return false;";
    // set css to display same disabled link in all browser
    LinkButton1.CssClass = "LinkButton_Disabled";
    

提交回复
热议问题