如何在textChanged之后将光标保留在文本框中 [英] how to keep cursor in the text box after the textChanged

查看:70
本文介绍了如何在textChanged之后将光标保留在文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在modalpopup上使用了文本框,我使用过.TxtATQuantityATC.Focus();保持焦点的方法,但它不起作用..plz告诉我另一个解决方案

i have taken textbox on modalpopup, i have used this.TxtATQuantityATC.Focus(); Method to keep focus but it doesn''t work ..plz tell me another solution

推荐答案

Follow these links it may help you

<a href="http://csharpdotnetfreak.blogspot.com/2009/09/popup-update-refresh-parent-child.html">http://csharpdotnetfreak.blogspot.com/2009/09/popup-update-refresh-parent-child.html</a>[<a href="http://csharpdotnetfreak.blogspot.com/2009/09/popup-update-refresh-parent-child.html" target="_blank" title="New Window">^</a>]

<a href="http://wiki.asp.net/page.aspx/282/">http://wiki.asp.net/page.aspx/282/</a>[<a href="http://wiki.asp.net/page.aspx/282/" target="_blank" title="New Window">^</a>]


protected void Page_Load(object sender,EventArgs e)

{

if(!Page.IsPostBack)

txtuid.Focus();

}





有关获得焦点的更多信息texbox你支票参考链接



聚焦和选择ASP.NET TextBox控件中的文本 [ ^ ]





默认焦点与ASP.NET 2.0的验证错误[^]





< edit>添加了第一个链接的网址< / edit>
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
txtuid.Focus();
}


for more information about getting focus in texbox you can check given reference link

Focusing and Selecting the Text in ASP.NET TextBox Controls[^]


Default Focuswith Validation Errors with ASP.NET 2.0 [^]


<edit> Added the URL for the first link </edit>


这篇关于如何在textChanged之后将光标保留在文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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