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

推荐订阅源

Engineering at Meta
Engineering at Meta
Cloudbric
Cloudbric
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
IT之家
IT之家
F
Full Disclosure
B
Blog RSS Feed
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
B
Blog
H
Help Net Security
The Cloudflare Blog
Recorded Future
Recorded Future
P
Proofpoint News Feed
P
Proofpoint News Feed
C
Cisco Blogs
T
Tailwind CSS Blog
P
Palo Alto Networks Blog
D
Docker
爱范儿
爱范儿
Know Your Adversary
Know Your Adversary
博客园 - 聂微东
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Y
Y Combinator Blog
雷峰网
雷峰网
AWS News Blog
AWS News Blog
D
DataBreaches.Net
博客园 - 司徒正美
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - Franky
C
Cybersecurity and Infrastructure Security Agency CISA
Blog — PlanetScale
Blog — PlanetScale
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Latest news
Latest news
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
C
CERT Recently Published Vulnerability Notes
阮一峰的网络日志
阮一峰的网络日志
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CXSECURITY Database RSS Feed - CXSecurity.com
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Cyber Attacks, Cyber Crime and Cyber Security
腾讯CDC
小众软件
小众软件
G
Google Developers Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Scott Helme
Scott Helme
O
OpenAI News

博客园 - 老蒋

[转]silverlight打印慢的问题 Android模拟器访问google网站获取天气信息时,出现 java.net.UnknownHostException: www.google.com 错误 在Eclipse中运行Android程序报 Failed to write core dump. Minidumps are not enabled by default on client versions of Windows 解决方法 在Eclipse中Override基类行为的便捷方式 20110515041233(yyyyMMddHHmmss)时间格式,转换成yyyy-MM-dd HH:mm:ss 未能从程序集 D:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll 加载任务“Microsoft.Build.Tasks.Delete”。 - 老蒋 [javascript]解决IE7的window.close()弹出确认提示框(转) - 老蒋 - 博客园 清除数据库日志文件 (转)按字节长度截取字符串(支持截取带HTML代码样式的字符串) asp.net 导出Excel时,解决纯数字字符串变成类似这样的 2.00908E+18 形式的代码 - 老蒋 (实战)使用ExtJs+WCF打造分行信息管理功能的一些心得 此数据库没有有效所有者,因此无法安装数据库关系图支持对象。若要继续,请首先使用“数据库属性”对话框的“文件”页或 ALTER AUTHORIZATION 语句将数据库所有者设置为有效登录名,然后再添加数据库关系图支持对象。 FileUpload控件IIS7上传限制设定方法 - 老蒋 - 博客园 IIS7.0 检测到在集成的托管管道模式下不适用的ASP.NET设置 的解决方法 江西人(一)---简介 使用C#打造自己的mp3播放器(基于Windows Media Player内核) 请教开发WinForm时输入法问题 WebPart使用问题 使用MD5加密注册用户密码的简单示例 - 老蒋 - 博客园
【转】使用ASP.NET 2.0新增加的SetFocus和MaintainScrollPositionOnPostback增强用户体验 - 老蒋 - 博客园
老蒋 · 2010-05-13 · via 博客园 - 老蒋

ASP.NET 2.0中新增加了2个很实用的属性和方法:

SetFocus()用来将光标聚焦到某个页面控件上

<%@ page language="C#" %>

<script runat="server">
    
void Page_Init(object sender, EventArgs e)
    
{
        SetFocus(focusHere);
    }

</script>

<html>
<head id="Head1" runat="server">
    
<title>Untitled Page</title>
</head>
<body>
    
<form id="form1" runat="server">
        
<asp:textbox id="default" runat="server" /><br />
        
<asp:textbox id="focusHere" runat="server" />
    
</form>
</body>
</html>

MaintainScrollPositionOnPostback 设置成true可以在页面PostBack的时候保持页面滚动条的位置

在web.config作如下设置即可:

<pages smartNavigation="true" maintainScrollPositionOnPostBack="true"/>

原文:http://www.cnblogs.com/necboy/archive/2006/02/17/332631.html