LinkButton lnkAppCNRno = Item.FindControl("lnkAppCNRNo") as LinkButton;
if (string.IsNullOrWhiteSpace(lnkAppCNRno.Text))
{
lnkAppCNRno.Text = Unavailable;
lnkAppCNRno.Enabled = false;
lnkAppCNRno.Style.Add("color", "red");
lnkAppCNRno.Attributes.CssStyle[HtmlTextWriterStyle.BackgroundColor] = "unset !important";
lnkAppCNRno.Attributes.CssStyle[HtmlTextWriterStyle.TextDecoration] = "none";
lnkAppCNRno.Attributes.CssStyle[HtmlTextWriterStyle.Cursor] = "default";
}
ref:- https://docs.telerik.com/devtools/aspnet-ajax/knowledge-base/common-disable-link-button-completely
https://www.codeproject.com/Questions/295591/how-to-set-linkbutton-enable-false-in-csharp-net
No comments:
Post a Comment