“自动完成关闭"不能在 IE 中工作 - ASP.Net [英] "Autocomplete off" not working in IE - ASP.Net

查看:30
本文介绍了“自动完成关闭"不能在 IE 中工作 - ASP.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:ASP:Textbox 上的 Autocomplete=off 是否有任何原因无法在 IE 7 中工作?

Question: Is there any reason Autocomplete=off on a ASP:Textbox would not be working in IE 7?

如果这是最好的术语,IE 自动完成功能是一个下拉列表,类似于从文本框下拉的内容,并显示您过去输入的内容.

In case this is the best term for it, the IE Autocomplete feature is that drop down list like thing that drops down from textboxes and shows you past things you have typed in.

对于作为用户控件的一部分的文本框,我需要 IE 自动完成功能在这一点上不起作用,该用户控件的工作方式类似于 Ajax 自动完成控件.问题是,当 Ajax 自动完成选择列表出现时,IE 自动完成选择框也会出现.(在我可能双击文本框的情况下)我正在使用这个:

I need the IE Autocomplete feature to not work at this point for a textbox that is part of a user control that works like an Ajax Autocomplete control. Problem is, when the Ajax Autocomplete selection list shows up, so does the IE Autocomplete selection box. (In cases where I might double click the textbox) I'm using this:

someTextbox.AutoCompleteType = AutoCompleteType.Disabled;

但它仍然出现.我已经尝试从 IE 自动完成中删除项目,但下次我输入内容并按 Enter 时,问题再次出现.有什么想法吗?

But it stills shows up. I've tried removing the items from the IE Autocomplete, but the next time I type something in and press enter, the problem reappears. Any ideas?

注意:查看源代码时,文本框使用 Autocomplete=off 标记呈现.

Note: The textbox is rendered with the Autocomplete=off tag when viewing the source.

注2:试过 someTextbox.Attributes.Add("autocomplete", "off");也没有成功

Note 2: Have tried someTextbox.Attributes.Add("autocomplete", "off"); also without success

* 更新,前阵子想出来了,但忘了*

test.AutoCompleteType = AutoCompleteType.None;

这确实有效.我不确定有什么区别.假设我有时间查一下.

That actually works. I'm not sure what the difference is though. Suppose Ill look that up sometime.

推荐答案

试图清除我在原帖中回答的未回答的问题.

Trying to clear out my unanswered questions that I've answered in the original post.

test.AutoCompleteType = AutoCompleteType.None;

这篇关于“自动完成关闭"不能在 IE 中工作 - ASP.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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