T Mac
T Mac

Reputation: 47

Find all asp:textboxes that are textmode=password and change display to none

Is there a way to find all asp:textboxes where textmode=password and change their display to none or do I need to give them all a class?

Thanks

Upvotes: 0

Views: 219

Answers (2)

Lee Taylor
Lee Taylor

Reputation: 7984

$('[type="password"]').css("display", "none");

Upvotes: 0

David Hedlund
David Hedlund

Reputation: 129792

A textbox with textmode "password" will render as an <input type="password" />. When using JavaScript/jQuery, the only thing you need to be concerned about is the rendered output; the client will have no concept of the code that was used to render it.

To hide all, simply use:

$('input[type=password]').hide();

Upvotes: 3

Related Questions