在.aspx页面的第一行(一般是第一行)加入SmartNavigation="true" ,如下<%@ Page language="c#" Codebehind="index.aspx.cs" SmartNavigation="true" AutoEventWireup="false" Inherits="myproj.index" %>

解决方案 »

  1.   

    In most circumstances, do not set this property in code. Set the SmartNavigation attribute to true in the @ Page directive in the .aspx file. When the page is requested, the dynamically generated class sets this property.When a page is requested by an Internet Explorer 5 browser, or later, smart navigation enhances the user's experience of the page by performing the following: eliminating the flash caused by navigation. 
    persisting the scroll position when moving from page to page. 
    persisting element focus between navigations. 
    retaining only the last page state in the browser's history. 
    Smart navigation is best used with ASP.NET pages that require frequent postbacks but with visual content that does not change dramatically on return. Consider this carefully when deciding whether to set this property to true.
      

  2.   

    用hidden控件保存滚动条的位置,
    此方法可以用于好多控件哦
    <html>
    <head>
    ...
    <script>
    function saveDivpos()
    {
    document.getElementByID("hdn_BodyPos").value = document.getElementByID("thebody").scrollTop;
    }
    </script>
    function sa
    </script>
    </head>
    <body id = "thebody" onscroll = "saveDivpos();">
    <from>
    ...
    <input type='hidden' runat='server' id='hdn_BodyPos'>
    ...
    <script>
    document.getElementByID("thebody").scrollTop = document.getElementByID("hdn_BodyPos").value ;</script>
    </form>
    </body>
    <html>
      

  3.   

    用hidden控件保存滚动条的位置,
    此方法可以用于好多控件哦
    <html>
    <head>
    ...
    <script>
    function saveDivpos()
    {
    document.getElementByID("hdn_BodyPos").value = document.getElementByID("thebody").scrollTop;
    }
    </script></head>
    <body id = "thebody" onscroll = "saveDivpos();">
    <from>
    ...
    <input type='hidden' runat='server' id='hdn_BodyPos'>
    ...
    <script>
    document.getElementByID("thebody").scrollTop = document.getElementByID("hdn_BodyPos").value ;</script>
    </form>
    </body>
    <html>
      

  4.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=0C25068E-55EA-4124-8CD6-726ECF5D5D3B