0

I am using a template site from Webmatrix 3.0 that includes a sign in page (among other pages) working primarily with c#, razor, html, and jquery. I have created a new page where users can register that includes a password field, as well as other text fields. My issue is, even when I simply have two fields on the cshtml page and nothing else, these fields are filled with data during an initial page request. This data is old "remember me" data from a previous sign in.

I can either do a get request from another page's form to land on this page, or navigate here from a href link, and the result is the same. To try to find the issue, I even cut almost all the code from the page leaving simply this:

<input type="text" />
<input type="password" />

And both fields are populated when I make an initial page request. I have tried to use things like

value = " something like blank or a single space in here "

etc in the html, as well as trying to clear out the fields to no avail with javascript (which I prefer not to since I have had very spotty success with things like onload). Is there a fairly sure fire way to clear text and password fields for initial page requests? Edit - I have tried autocomplete=off to no avail as well.

  • Possible duplicate of [Clear browser saved password through jquery](http://stackoverflow.com/questions/29910678/clear-browser-saved-password-through-jquery) – NovaLogic Nov 01 '15 at 20:47
  • Thanks NovaLogic, but I have tried autocomplete=off to no avail as well. – Fippy Darkpaw Nov 01 '15 at 20:57
  • How about ? – NovaLogic Nov 01 '15 at 21:15
  • NovaLogic - I left the first "readonly" part off since the editor didn't like it, then ran it and received no solution as it were. – Fippy Darkpaw Nov 01 '15 at 21:28
  • Do not leave it off. Try readonly="readonly" instead of just readonly to calm the editor down. Since the autocomplete thingy did not work, I am guessing you are on an older browser. What browser are you using? – NovaLogic Nov 01 '15 at 21:58
  • That calmed the editor down, and did the trick. Thank you NovaLogic. Is there a way for me to accept an answer or the like for this solution? – Fippy Darkpaw Nov 01 '15 at 22:10
  • And, if it helps anyone I was testing against Firefox 41.0.2 and Opera 33.0. – Fippy Darkpaw Nov 01 '15 at 22:21
  • No need to accept an answer here, since there is already a similar question asked and answered in another post. People will likely be redirected there. Glad to be of help. :) – NovaLogic Nov 01 '15 at 22:49

0 Answers0