简体   繁体   English

保持回发ASP.net上的滚动位置不起作用

[英]Maintaining Scroll Position on Post Back ASP.net not working

Im using an Ajax update panel with ac# multiline textbox which updates on a timer, but it keeps scrolling to the top, Ive tried setting maintainginscrollpositiononpostback to true and also tried various javascripts. 我使用了带有ac#多行文本框的Ajax更新面板,该面板在计时器上进行更新,但一直滚动到顶部,我尝试将maintainginscrollpositiononpostback设置为true,还尝试了各种JavaScript。 The broswer im using is IE. 我使用的浏览器是IE。

This is my asp code with ac# textbox on the form. 这是我的带有ac#文本框的ASP代码。

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

            <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" Height="390px" TextMode="MultiLine" Width="836px"></asp:TextBox>

        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
        </Triggers>
    </asp:UpdatePanel>

Im quite new to the updatepanel so maybe something is wrong there,, Thanks\\ 我对updatepanel相当陌生,所以也许那里出了点问题,谢谢\\

Please read this article. 请阅读这篇文章。 I think it will help you 我认为这会帮助你

Maintain Scroll Position after Asynchronous Postback 异步回发后保持滚动位置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM