开发者

How set cursor to the top of page under UpdatePanel

开发者 https://www.devze.com 2023-03-12 03:11 出处:网络
How can i set the cursor focus on the top of the page开发者_StackOverflow when I clicked Update button.

How can i set the cursor focus on the top of the page开发者_StackOverflow when I clicked Update button. Update button is under UpdatePanel

thank...


i'm not clear with what you mean (top of the page) So, i assume you want to focus on text box.

To do this, Add this in your page_load()'s

   if(!IsPostBack)
    {
       btnUpdate.Attributes.Add
         ("onclick","document.getElementById('<%= txtName.ClientID %>').focus()");
    }

Hope it works! (not tested yet)

0

精彩评论

暂无评论...
验证码 换一张
取 消