0
我是新来的asp.net,并试图为我的项目制作一个页面,但是当我运行此页面时出现错误,此页面有直接循环。请提供给我任何解决方案此页面在asp.net中有重定向循环错误
这是我的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using idw.DBhelper;
using System.Web.Security;
namespace idw.realitycheck
{
public partial class SignIn : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
public void LoginButton_onclick(object sender, System.EventArgs e)
{
idwUser accountSystem = new idwUser();
string userId = accountSystem.Login(email.Text,password.Text);
if ((userId != null) & !string.IsNullOrEmpty(userId))
{
// Use security system to set the UserID within a client-side Cookie
FormsAuthentication.SetAuthCookie(userId, RememberCheckbox.Checked);
// Redirect browser back to originating page
FormsAuthentication.RedirectFromLoginPage(userId, false);
}
else
{
Message.Text = "Login Failed!";
}
}
}
}