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

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
博客园 - Franky
MyScale Blog
MyScale Blog
Jina AI
Jina AI
B
Blog
Microsoft Security Blog
Microsoft Security Blog
T
Troy Hunt's Blog
博客园_首页
T
Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
Lohrmann on Cybersecurity
GbyAI
GbyAI
T
Tenable Blog
B
Blog RSS Feed
S
Securelist
T
Threat Research - Cisco Blogs
P
Privacy International News Feed
P
Proofpoint News Feed
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
博客园 - 三生石上(FineUI控件)
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
C
CXSECURITY Database RSS Feed - CXSecurity.com
罗磊的独立博客
AWS News Blog
AWS News Blog
V
V2EX
宝玉的分享
宝玉的分享
J
Java Code Geeks
小众软件
小众软件
Spread Privacy
Spread Privacy
腾讯CDC
Google Online Security Blog
Google Online Security Blog
月光博客
月光博客
V
Visual Studio Blog
The Hacker News
The Hacker News
C
CERT Recently Published Vulnerability Notes
Project Zero
Project Zero
Know Your Adversary
Know Your Adversary
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
Apple Machine Learning Research
Apple Machine Learning Research
NISL@THU
NISL@THU
C
Check Point Blog
Webroot Blog
Webroot Blog
D
DataBreaches.Net
Cloudbric
Cloudbric
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家

博客园 - 阿凯(china)

程序员的.NET时代 Web 2.0 概念汇总 使用AJAX技术开发新一代Web应用程序 2 使用AJAX技术开发新一代Web应用程序 1 Ajax的宣传及现状:改变门户体验的技术 AJAX简介(转) AJAX开发简略 (第二部分) AJAX开发简略 (第一部分) 转载:XMLHTTP介绍 - 阿凯(china) - 博客园 AJAX基础教程 近10年最强的50本计算机图书,您读过几本? 2005年十本最佳商业与管理书籍 Asp.Net 学习资源列表 ASP.NET 2.0 绑定高级技巧 ADO.NET 2.0 功能一览 深度解析Asp.Net2.0中的Callback机制 关于视图状态 ASP.NET 2.0 中的数据源控件 ASP.NET 2.0 和数据绑定控件:新的角度,新的做法
学习杂记1
阿凯(china) · 2005-12-12 · via 博客园 - 阿凯(china)

PlaceHolder控件:
专门作为其它控件的容器。

获取DataTable模式信息:
ds.FillSchema()
同时获取模式与数据可设置MissingSchemaAction属性:接受MissingSchemaAction枚举值之一:
.Add---在添加新行时向DataTable中添加必须的附加列(默认值)
.AddWithKey---在添加新行时向DataTAble中添加所有必须的列。
.Error---在添加新行时,如果此行不匹配现在的DataTable,就引发一个错误。
.Ignore---在添加新行时,如果此行中包含DataTable中没有的列,那么忽略多余的列。
ds.MissingSchemaAction = MissingSchemaAction.AddWithkey

在DataTable中计算列值:
可以使用DataTable类的Computer方法计算列值,如sum(),Avg()

使用表单身份验证:
表单身分验证依赖于浏览器的Cookie来判断用户的身份。为一个目录启用表单身份验证之后,只有那些在cookie中存储了正确的身份验证票据的用户才能访问此目录的页面。
位于system.Web.Security名称空间中。
.FormsAuthentication :这个类包含几个共享的方法,用于表单身份验证。
.FormsAuthenticationTicket :这个类代表在cookie中使用的用于表单身份验证的身份验证票据。
.FormsIdentity :这个类代表表单身份验证所检验的用户身份。
.FormsAuthenticationModule :这个类是表单身份验证实际使用的模块。
<configuration>
  <system.web>
    <authentication mode = "Forms">
    <forms
        name = ".Mycookie" 
        loginUrl = "/login/mylogin.aspx"
        protectino = "All"
        timeout = "80"
       path = "/"
    </authentication>
    <authorization>
      <deny users = "?"/>
    </authorizatin>
  </system.web>
</configuration>
FormsAuthentication.RedirectFormLoginPage(txtUsername,chkRemember.checked)
参数:用户名与一个布尔值(表示是否应该创建持久性的cookie)
其执行2个操作:
1、其在用户的浏览器上创建一个包含身份验证票据的cookie
2、使用浏览器自动将用户转移回原来的页面(ReturnUrl)

获取用户信息:
由FormsIdentity类来表示:
.AuthenticationType :总是返回Forms这个值。
.IsAuthenticated :表示用户是否已经通过身份验证。
.Name :表示已经验证的用户的名字。
.Ticket :指定与当前用户相关联的cookie身份验证票据。

注销
FormsAuthentication.Signout()