C# password TextBox in a ASP.net website June 4, 2023 by Tarik To do it the ASP.NET way: <asp:TextBox ID="txtBox1" TextMode="Password" runat="server" />