asp.net adrotator垂直页面滚动问题 [英] asp.net adrotator vertical page scrolling problem
本文介绍了asp.net adrotator垂直页面滚动问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用asp.net adrotator.我将其与计时器一起放置在ajax更新面板中.问题是,当计时器更新时,并且我在垂直向下滚动页面或刚刚完成垂直滚动时,页面将刷新到以前的位置.我如何获取它进行更新并使页面保留在同一位置?
i am using the asp.net adrotator. i have placed it in the ajax update panel along with the timer. the problem is that when when the timer updates, and i am vertically scrolling down the page or have just finished vertically scrolling, the page refreshes to where it was previously. how can i get it to update and have the page remain in the same place? thank you in advance.
推荐答案
在页面指令中添加MaintenanceScrollPositionOnPostback ="true".这将使页面保持在回发后滚动的位置
Add MaintainScrollPositionOnPostback="true" to page directive. This will keep your page at the position you scrolled after postback
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CourseSubject.aspx.cs" Inherits="BBCApplication.Students.CourseSubject" MasterPageFile="~/Site2.Master" MaintainScrollPositionOnPostback="true"%>
这篇关于asp.net adrotator垂直页面滚动问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文