<asp:Login ID="Login1" runat="server"
FailureText="חיבורך לא הייה מוצלח. אנא נסה שנית" LoginButtonText="התחבר"
PasswordLabelText="סיסמה:" PasswordRequiredErrorMessage="יש צורך בסיסמה"
RememberMeText="זכור אותי פעם הבאה" TitleText="" UserNameLabelText="שם משתמש:"
UserNameRequiredErrorMessage="יש צורך בשם משתמש" Height="100px"
DestinationPageUrl="~/AllQuestions.aspx" PasswordRecoveryText="שכחת סיסמה"
PasswordRecoveryUrl="~/RetrievePassword.aspx" RememberMeSet="True"
onauthenticate="Login1_Authenticate">
<CheckBoxStyle Height="50px" />
<ValidatorTextStyle BorderColor="#CC0000" />
</asp:Login>
該控件僅在沒有此部分的情況下工作:onauthenticate="Login1_Authenticate"
包含該部分,它不會讓我登錄!登錄控制問題
我不知道爲什麼,雖然:(
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
if (UsefulStaticMethods.CheckIfUserISbanned(Login1.UserName))
{
Server.Transfer("~/Banned.aspx");
}
}
這是怎麼回事?錯誤?沒有? – Nix
當你調試代碼到達了嗎?並且CheckIfUserISbanned的行爲是否正確?或者如果你得到和錯誤是什麼? – Dave
正如我所說...沒有錯誤...默認消息出現:「你不能登錄,再試一次」 –