在使用UpdatePanel时,使启用false并设置焦点
updatePanel可能没有相关,但是,我有这个代码:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox runat="server" MaxLength="10" CssClass="form-control col-sm-7" ID="RegisterID" OnTextChanged="RegisterID_TextChanged" AutoPostBack="true"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:TextBox runat="server" Enabled="false" MaxLength="15" autocomplete="chrome-off" CssClass="form-control col-sm-7" ID="RegisterPhone" OnTextChanged="RegisterPhone_TextChanged" AutoPostBack="true"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
我希望在功能过度禁用启用false并将重点放在此之后( id = nocessphone )字段上,
我通过JS和通过JS尝试了c#
注意!页面上的其他字段,是的,启用了false
我需要添加一些内容: scriptmanager 或: updatePanel ??
UpdatePanel may not be related but, I heve this code:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox runat="server" MaxLength="10" CssClass="form-control col-sm-7" ID="RegisterID" OnTextChanged="RegisterID_TextChanged" AutoPostBack="true"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:TextBox runat="server" Enabled="false" MaxLength="15" autocomplete="chrome-off" CssClass="form-control col-sm-7" ID="RegisterPhone" OnTextChanged="RegisterPhone_TextChanged" AutoPostBack="true"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
I want that after the function is over Disable the Enabled to false and make focus on this (id = RegisterPhone)field
I tried both through Js and through C #
note! Other fields on the page, Yes become Enabled to false
I need to add something in: ScriptManager or in: UpdatePanel??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论