Asp.Net Forms验证实例
在Asp.Net提供了三种常用的验证方式:Windows方式是和IIS结合起来可以实现基本、摘要、集成 Windows等身份验证;Passport方式是使用Windows Live ID的帐户来进行统一验证的;Forms方式是使用常见的表单来实现验证。
一、普通实现方式
这种方式是最简单的,只需要配置一下就可以了。
1、执行aspnet_regsql命令建立数据库
aspnet_regsql命令在C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727目录下,按提示运行就可以了
2、新建一个web网站
在Web.Config中加入配置:
<connectionStrings>
<add name="MySqlConnection" connectionString="Data Source=dbserver;Initial Catalog=database;user id=userid;password=****;" />
</connectionStrings>
<system.web>
<authorization>
<deny users="?"/>
</authorization>
<authentication mode="Forms">
<forms loginUrl="login.aspx" name=".ASPXAUTH"/>
</authentication>
<membership defaultProvider="SqlProvider">
<providers>
<clear />
<add connectionStringName="MySqlConnection" applicationName
相关文档:
use http header
protected void Page_Load(object sender, EventArgs e)
{
string format = Convert.ToString(ViewData["format"]);
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode("费用报销表", Encoding.UTF8) + string.Forma ......
1. 镜头迁徙应当应用实施镜头重定向的Response.Redirect而不是Server.Transfer,由于Server.Transfer不改变IE客户端URL,能以致ASP.NET AJAX客户端脚本访问资源的时分出现URL错处。
二.在服务器端登记脚本和掩藏字段应当施用种ScriptManager,而不是Page.ClientScript对象,由于Page.ClientScript的步骤是将脚本登记 ......
原地址:http://blogs.msdn.com/giorgio/archive/2009/02/01/asp-net-menu-and-ie8-rendering-white-issue.aspx
ASP.NET Menu and IE8 rendering white issue
If you are using the ASP.NET Menu control, you might encounter under certain circumstances an issue where the menu appears as a white box in IE8 Stan ......