我有一个文本框(textBox1),当用户点击当前页面时我不需要焦点。问题是,我不能集中另一个控制器上,because the textbox is the only control that allows input.仅当可编辑控件时从文本框中移除焦点
我有几个隐藏字段,但专注于他们不会从文本框(hidden1.Focus()
)移除焦点。
我看到某处可以禁用并启用控制器,但那也不起作用。
想法?
编辑
这里是控制我有:
<asp:TextBox ID="TextBox1" runat="server" autocomplete="off"></asp:TextBox>
<asp:Label ID="lblHide" runat="server"></asp:Label>
<input type="hidden" id="hidden1" runat="server" value="false"/>
//C# code
protected void Page_Load(object sender, System.EventArgs e)
{
TextBox1.TabIndex = -1;
lblHide.Focus();
}
你是什么意思,“控制器“?你的意思是,“控制”? –