如何防止ASP:Textbox中的先前数据自动填充? [英] How to prevent autofill of previous data in ASP:Textbox?

查看:291
本文介绍了如何防止ASP:Textbox中的先前数据自动填充?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个简单的控件.当我的页面加载时,它会自动填满.

I have 2 simple controls. When my page loads, it automatic fills up.

我收到了以下参考资料,建议设置为Autocomplete = Off

I got following reference which suggests to set Autocomplete = Off

停止浏览器向文本框填充详细信息

https ://forums.asp.net/t/1107643.aspx?How + do + you + disable + history + info + on + a + textbox +

但是它不起作用.您可以在上面的屏幕截图中看到.这是电子邮件字段,当页面加载时,该字段由缓存的引用自动填充.会很头疼的.

But it doesn't work. You can see above screenshot. It is email field which automatically filled by reference of cache when page loaded. It is going to be headache.

有人可以建议我如何预防这种情况吗?

Can anybody please suggest me how to prevent this?

请注意,我不想清除历史记录.我只希望页面加载时不应该填写此内容.

Please note, I don't want to clear history. I just want that this should not be filled up when my page loads.

推荐答案

添加autocomplete="new-password"将解决您的问题.我尝试了autocomplete="off"autocomplete="false"都对我不起作用.完美地autocomplete="new-password"

Adding autocomplete="new-password" will solve your problem. I have tried autocomplete="off" and autocomplete="false" both did not work for me. This works perfectly autocomplete="new-password"

这篇关于如何防止ASP:Textbox中的先前数据自动填充?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆