0

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??

  • Just put both textboxes in the same updatepanel and it will work. ps you can set focus like this `RegisterPhone.Focus();` – VDWWD May 18 '22 at 09:33
  • It was like that. Unfortunately it did not work. In addition, pressing on tab, skips it to the next field –  May 18 '22 at 09:38

0 Answers0