如何在更新面板下的文本框上获取光标 [英] How to get cursor on a textbox under an update panel

查看:121
本文介绍了如何在更新面板下的文本框上获取光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在更新面板下有两个文本框,定期刷新。当它刷新时,我从正在键入的文本框中丢失了光标。如何将光标放在我刷新后输入的文本框上。

I have two textbox under an update panel that is refresh periodically. When it refresh I lost cursor from the textbox I was typing. How to get the cursor on the textbox i was typing after refresh it.

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
     <ContentTemplate>

         <asp:Timer ID="updateTimer" runat="server" Interval="5000" OnTick="updater_Tick">
         </asp:Timer>
         <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

         <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

     </ContentTemplate>
 </asp:UpdatePanel>

推荐答案

检查此链接 [ ^ ]


这篇关于如何在更新面板下的文本框上获取光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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