0

I am programming in ASP.NET MVC, and in a web page (.cshtml) I have text input areas like:

<td>
   <input type="text" value="@p.QtdVendida" asp-for="@p.QtdVendida" data-key="@p.id" id="@("p_QtdVendida" + p.id.ToString())" />
</td>
<td>
   <input type="text" value="@p.QtdBonus" asp-for="@p.QtdBonus" data-key="@p.id" id="@("p_QtdBonus" + p.id.ToString())" />
</td>

How can I prevent that the list that opens automatically with previous input texts (e.g. from other sessions), and which always open in the text input in the first row of the table, even if I am editting the second row… appears? If I click in one of the listed elements, it changes only the input area in the first row…

I have the same issue in all text input (type="text") in the table.

Could you help me?

Thank you very much.

JDias
  • 126
  • 5
  • 13
  • Does this answer your question? [How do you disable browser Autocomplete on web form field / input tag?](https://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tag) – Akash Shrivastava Dec 12 '19 at 11:21
  • 1
    Thank you. The issue is solved... – JDias Dec 12 '19 at 14:47

2 Answers2

5

just add autocomplete to your input field:

<input type="text" autocomplete="off"/>

as described here

majita
  • 1,278
  • 14
  • 24
1

WARNING: Don't do the above answer because not all browsers support it, and might still convey auto complete - instead do this:

<input type="text" name="foo" autocomplete="off" />

monkey
  • 526
  • 7
  • 21