How to hide the cancel button in an ASP.NET ChangePassword control

I am considering using the ChangePassword control in an ASP.NET 2.0 web form. I do not want the cancel button to appear.

Is there a good way to hide this without resorting to the silly types "width = 0"?

Or maybe there is a general way to go through parts of a composite control like this and hide individual parts?

+3
source share
3 answers

Set CancelButtonStyle.CssClass to something like "hiddenItem" and set the CSS to "display: none".

. Design Visual Studio, , - " ".

+7

.aspx - changepassword:

CancelButtonType = "" CancelButtonText = ""

+3

You can use the ChangePassword.CancelButtonStyle property to set the CSS class to the Cancel button. Then just apply "display: none" in the specified class.

0
source

Source: https://habr.com/ru/post/1696588/


All Articles