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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 阿凯(china)

程序员的.NET时代 Web 2.0 概念汇总 使用AJAX技术开发新一代Web应用程序 2 - 阿凯(china) 使用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()