惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
SecWiki News
SecWiki News
宝玉的分享
宝玉的分享
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Engineering at Meta
Engineering at Meta
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog
Microsoft Azure Blog
Microsoft Azure Blog
N
News and Events Feed by Topic
Cloudbric
Cloudbric
B
Blog
Cisco Talos Blog
Cisco Talos Blog
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic
V
Visual Studio Blog
A
Arctic Wolf
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42
S
Security @ Cisco Blogs
博客园 - 聂微东
T
Threat Research - Cisco Blogs
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
G
GRAHAM CLULEY
L
LINUX DO - 热门话题
量子位
NISL@THU
NISL@THU
Webroot Blog
Webroot Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Troy Hunt's Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tenable Blog
月光博客
月光博客
S
Security Affairs
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
The Hacker News
The Hacker News
Spread Privacy
Spread Privacy
D
Docker
www.infosecurity-magazine.com
www.infosecurity-magazine.com
雷峰网
雷峰网
博客园 - 司徒正美
T
The Exploit Database - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
Help Net Security
Help Net Security
D
DataBreaches.Net

博客园 - Burt

软件项目研发的设计流程 访问IIS元数据库失败解决方法(转) 经典SQL语句大全 js 比较2日期大小 - Burt - 博客园 合并表格,并实现对datatable的group by 功能 - Burt 时间段查询 left join on sql 日期格式转换(convert用法)(转) 分页存储过程 Dropdownlist样式设置 - Burt - 博客园 TreeView的遍历(转) 读取天气预报所产生乱码解决方法MiniSite.Weather.print("Wealth") 40种网页常用小技巧(javascript) 页面图象鼠标操作放大和制作图片热点 无法将类型login_aspx转换为System.Web.UI.WebControl c# 发邮件(转摘) [没有相关源的行] 访问被拒绝 水晶报表制作 页面自动刷新以及广告程序得Javascript代码
刷新后保持页面滚动条位置C#&VB(转) - Burt - 博客园
Burt · 2009-06-16 · via 博客园 - Burt

step 1
replace the tag of <body> with the follewing codes:

<%
  if (Request["__SCROLLPOS"] != null &&
      Request["__SCROLLPOS"] != String.Empty) {
      int pos = Convert.ToInt32 (Request["__SCROLLPOS"]);
      Response.Write ("<body id=\"theBody\" " +
          "onscroll=\"javascript:document.forms[0].__SCROLLPOS.value = " +
          "theBody.scrollTop;\" " +
          "onload=\"javascript:theBody.scrollTop=" + pos + ";\">");
  }
  else {
      Response.Write ("<body id=\"theBody\" " +
          "onscroll=\"javascript:document.forms[0].__SCROLLPOS.value =" +
          "theBody.scrollTop;\">");
  }
%>

step 2
add the follewing codes between <form> and </form>

<input type="hidden" name="__SCROLLPOS" value="" />

--------------------------------------------------------------------------------

vb
step 1
replace the tag of <body> with the follewing codes:

<%
         If Not Request("__SCROLLPOS") Is Nothing then
         if Request("__SCROLLPOS") <> String.Empty Then
            Dim pos As Integer = CType(Request("__SCROLLPOS"), Integer)
            Response.Write("<body id=""theBody"" onscroll=""javascript:document.forms[0].__SCROLLPOS.value = theBody.scrollTop;"" onload=""javascript:theBody.scrollTop=" + pos.tostring + ";"">")
       end if
       else
            response.Write("<body id=""theBody"" onscroll=""javascript:document.forms[0].__SCROLLPOS.value =theBody.scrollTop;"">")
     
        end if
%>

step 2
add the follewing codes between <form> and </form>

<input type="hidden" name="__SCROLLPOS" value="" />


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/doublewang/archive/2006/08/25/1117815.aspx