ASP.NET用户名及密码放在Web.config中的Forms验证
2008-09-07 16:58
246 查看
web.config
登陆按钮:
protected void Button1_Click(object sender, EventArgs e)
{
bool result = FormsAuthentication.Authenticate(TextBox1.Text, TextBox2.Text);
if (result)
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, true);
}
登陆按钮:
protected void Button1_Click(object sender, EventArgs e)
{
bool result = FormsAuthentication.Authenticate(TextBox1.Text, TextBox2.Text);
if (result)
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, true);
}
相关文章推荐
- 关于asp.net web程序的访问,为什么老提示输入用户名和密码?
- ASP.NET配置文件Web.config
- ASP.NET 程序安全性 (一) web.config加密与解密
- ASP.NET本调试下配置Web.config识别json
- 在asp.net 2.0中的web.config文件中调用外部文件
- asp.net代码中修改web.config节点的具体方法
- asp.net中web.config配置节点大全详解
- 读书札记:Webconfig元素配置详解(ASP.NET 设置架构)
- ASP.NET Web.config文件的配置(Configuration API)
- asp.net(vb)与sql的连接(代码写在web.config中的)
- 【整理】asp.net web.config加解密
- ASP.NET配置文件Web.config
- ASP.NET数据库连接字符串写在config.web配置文件中
- ASP.NET中使用web.config配置数据库连接
- asp.net web.config 设置Session过期时间
- 发布ASP.NET时web.config内容的参数化
- asp.net:web.config详解
- 转贴:ASP.NET Cookies简单应用 记住用户名和密码
- ASP.NET通过配置Web.config文件提高手动绑定数据库效率的一个简单方法,不用每次手动连接数据库地址,或者数据库地址变更时只改一处即可。
- ASP.NET连接ACCESS、SqlServer以及Oracle数据库的web.config内路径最优写法