English 中文(简体)
Ajax s Timer OnTick活动
原标题:scroll position on Ajax s Timer OnTick event

Inside the one of contentPlaceHolder of the masterpage I m using Iframe. And In Iframe suppose, IfrmPage.aspx I m using update panel where timer control is updating the page for each certain duration.

因此,我试图做的是,在奥特克事件之后,把注意力放在文字箱上。 I m 采用以下线:

文本:Manager1.Set Focus(this.txtMessage.ClientID);

这一工作是正确的。 然而,主页或我应该说,主页的滚动车改变了他们所宣布的立场。

请分享你的宝贵经验。

感谢。

最佳回答

在对山角进行海.之后,我找到了答案。

Now I m setting the focus to txtMessage(textbox) using javascript and remove this code: ScriptManager1.SetFocus(this.txtMessage.ClientID); final answer is here:

<script type="text/javascript">
     var prm = Sys.WebForms.PageRequestManager.getInstance();
     prm.add_pageLoaded(pageLoaded);
     function pageLoaded(sender, args) {
         if (args.get_panelsUpdated().length > 0) {
             $get( txtMessage ).focus();
         }
     }
</script>
问题回答

你们是否尝试在伊夫姆帕吉斯登上首页的“维持危机”?





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签