Note that there are some explanatory texts on larger screens.

plurals
  1. POPassword-Box not showing any content
    text
    copied!<p>I have a small websolution that needs the user to input a password. I have two input boxes </p> <pre><code>&lt;input type="password" runat="server" id="m_txtPassword1"/&gt; </code></pre> <p>If I set some chars to the Value-property of the control like this:</p> <pre><code>m_txtPassword1.Value="someChars"; </code></pre> <p>The password box is rendered empty. No bullets are shown. If I look into the rendered html-source, also no value-tag has been rendered. If I change the type to </p> <pre><code>&lt;input type="text" runat="server" id="m_txtPassword1"/&gt; </code></pre> <p>the chars are shown. Is this by design? How can I disable this feature?<br> Please note, I don't want to put a real password into the value-property, I only want to show the user that there is already a password set, and this is IMO done best with some 8 bullets in the input-control. But for this, I need the possibility to set the value-property of the control.</p> <p><strong>Update</strong></p> <p>For all, having the same problem: I have tried to declare <code>&lt;asp:textbox id="m_txtPassword1" runat="server" TextMode="Password" /&gt;</code> with the same result. Also <code>m_txtPassword1.Attributes["value"]="someChars"</code> has not helped.</p> <p>It seems that this is realy not possible. </p> <p><strong>As a workaround</strong>, I declared the password-boxes as plain html without the runat="server" and have set the value-property in markup (via two properties from the code-behind). Not nice but I really want to show the user that he has already entered a password.<br> Another workaround would be to set the value through javascript on load.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload