If you want the user's text input to be replaced with asterisks, you need to use the password input input - a text will not do this only:
<input type="password" id="txtPwd" runat="server" />
However, the default value will be empty (this also applies to the text input). If you want to initialize this default value, you can do it like this:
<input type="password" value="dummy" id="txtPwd" runat="server" />
Note. I highly recommend not putting the user password as the default for the password field! This may compromise your users password.
If you want to display asterisks as placeholder text when the field is empty, you can do this using the placeholder attribute (again, this refers to the text input):
<input type="password" placeholder="*****" id="txtPwd" runat="server" />
source share