linda

linda

  • NA
  • 6
  • 0

can not redirect page

Aug 3 2009 9:34 AM
I have my login page is working, I can connect to the db server and check user, Looks like this. int i = database.DBStore1.ReturnDB("select * from users where username='" + Username.Text.Trim() + "' and Password='" + Password.Text.Trim() + "'"); if (i > 0) { Session.Add("username", Username.Text); msglbl.Text = "
Successfully Login
"; Response.Redirect("default.aspx"); } else { msglbl.Text = "
Invalid user name or Password!
Please Enter Again
"; } } Above code works, except I can not direct to default.aspx (the url shows as) http://localhost:2253/test/Login.aspx?ReturnUrl=%2ftest%2fdefault.aspx any idea why I can't see default.aspx Thank you

Answers (3)