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

推荐订阅源

Google DeepMind News
Google DeepMind News
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
A
About on SuperTechFans
WordPress大学
WordPress大学
B
Blog
Martin Fowler
Martin Fowler
Jina AI
Jina AI
I
InfoQ
P
Proofpoint News Feed
小众软件
小众软件
S
SegmentFault 最新的问题
V
V2EX
B
Blog RSS Feed
量子位
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
博客园 - 三生石上(FineUI控件)
MongoDB | Blog
MongoDB | Blog
美团技术团队

博客园 - 真见

用户中心 - 博客园 如何在ASP.NET中使用Windows Live Web Bar 博客园的一篇好文 Internet Explorer 8.0 正式版 提交按钮OnCheck之后的技巧 - 真见 - 博客园 如何在ASP.NET中使用Syndication创建一个RSS源 如何创建Sql Server数据库关系图 + Silverlight 2 GDR1 发布 如何在ASP.NET中使用验证通过的Windows Live ID用户登录网站 Using-更精彩更有用的做法-短签名 我的Windows 7系统 Internet Explorer 8 RC1发布 新浪首届我的创业路征文大赛初评榜单公布 得到微软DevWow博客达人征文大赛优秀奖,奖得微软T-Shirt一件 我的五项 Windows Live Writer 使用习惯分享 + 来自 Jackson Fish Market 的虚拟鲜花赠送服务推荐 摇滚真见的生日 Sueetie源代码发布【 推荐 】 中国版 Windows Live Wave3 介绍站点 ASP.NET网站编程人员2008年技术文章参照 Visual Studio可视化IDE风格主题参照
ASP.NET WebForms 4.0 新属性
真见 · 2009-02-04 · via 博客园 - 真见

现在ASP.NET 4.0已经有了培训教程:http://channel9.msdn.com/shows/10-4/10-4-Episode-3-ASPNET-WebForms-40/, 更深入的系列可以看:http://channel9.msdn.com/shows/10-4

ASP.NET4.0---Page新属性

ASP.NET 4.0 WebForms在Page上是增加了两个新属性,一个是Page.Keywords,一个是Page.Description。

以前是:

<head runat="server">

    <title>Untitled Page</title>

    <meta name="keywords" content="SampleKeywords" />

    <meta name="description" content="SampleDescription" />

</head>

现在是 设在页面指令顶部:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MetaWeblogSample._Default" 
    Keywords="SampleKeywords" Description="SampleDescription"
%>

与 后台编程:

protected void Page_Load ( object sender, EventArgs e ) {
          this.Page.Keywords = "SampleKeywords";
          this.Page.Description = "SampleDescription";
          Response.Write ( "" );
 }

这里还有个简单的小工具:http://www.apogee-web-consulting.com/tools/keyword_tool.php

ASP.NET4.0---ASP.NET控件新增的ViewStateMode属性

至于ASP.NET 4.0为什么会这样做,可以先看看这篇文章:http://www.infoq.com/cn/news/2009/01/ASP-4-View-State, ASP.NET控件的ViewStatMode属性可能有3个值:Enabled, DisabledInherit。

除了在控件上有这个属性,在Page上也新增了:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MetaWeblogSample._Default" 
    ViewStateMode="Disabled"
%>