I’m new to ASP.NET and need a little help.
I have a MasterPage and log in dialog box. If user are choose remember me options I need to execute directly btnLogin.
Look my code:
protected void Page_Load(object sender, EventArgs e)
// … other code
if (sRememberMe == "1")
txtLogin.Text = sLogin; btnLoginClick(true,true );
protected void btnLogin_Click(object sender, EventArgs e)
// check user name / psw …
It produce strange error and I find that problem is that in Page_Load I can not call Redirect/ So – how to change code ?
I try, but not find list with other events of this form. May be I need to put this code in some events like LoadPageComplate ? Or I need to use Timer and after 3-5 sec. to do redirect?