0

I have the following code:

 <dl class="dl-table">
                         <dt style="width:170px">Current Password:</dt>
                            <dd>
                               @Html.Password("CurrentPassword", "")
                            </dd>
                           <dt style="width:170px">New Password:</dt>
                            <dd>
                              @Html.Password("NewPassword", "")
                            </dd>
                           <dt style="width:170px">Confirm New Password:</dt>
                            <dd>
                              @Html.Password("ConfirmNewPassword", "")
                            </dd>
                        </dl>

But, for some reason, it is displayed like this:

enter image description here

Why is it pre-populating?

user3272686
  • 853
  • 2
  • 11
  • 23
  • 2
    possible duplicate of [Make page to tell browser not to cache/preserve input values](http://stackoverflow.com/questions/2699284/make-page-to-tell-browser-not-to-cache-preserve-input-values) – Erik Philips Feb 22 '14 at 00:46
  • 1
    Yeah I suspect it is caching your last input. Try turning that off. If it doesn't solve it I would look at how the page is generated. – Heberda Feb 22 '14 at 11:44

1 Answers1

1

Try to set autocomplete="off"

@Html.Password("ConfirmNewPassword", "", new { autocomplete = "off" } )
VladL
  • 12,769
  • 10
  • 63
  • 83