flyclassic22
Technical User
hi, i'ved created a membership page with asp.net (not with membership roles)
In my login.aspx
i've 2 textbox (password and username)and 1 button to login:
protected void Button1_Click(object sender, EventArgs e)
{
if (Page.IsValid) {
if(authenticateUser(usernameTXT.Text.Trim(),passwordTXT.Text.Trim())){
FormsAuthentication.RedirectFromLoginPage(usernameTXT.Text.Trim(), false);
}
else{
loginLabel.Text = "Error logging in with your username and password, please check and try again.";
}
}
Everything worked well. So i put a line in all the aspx pages(eg, shoppingcartcheckout.aspx) that a member can access in the pageload:
if (User.Identity.IsAuthenticated)
{
...do whatever here
}
else{
Response.Redirect("login.aspx")
}
I've a scenario here
Whenever i try to access shoppingcartcheckout.aspx without login, it prompts me to login.aspx... which is what i wanted, but after i successfully login, it redirects me to Default.aspx. I want to go back to that shoppingcartcheckout.aspx instead of Default.aspx and i've go and click shopping cart> checkout again..
Any help,?
In my login.aspx
i've 2 textbox (password and username)and 1 button to login:
protected void Button1_Click(object sender, EventArgs e)
{
if (Page.IsValid) {
if(authenticateUser(usernameTXT.Text.Trim(),passwordTXT.Text.Trim())){
FormsAuthentication.RedirectFromLoginPage(usernameTXT.Text.Trim(), false);
}
else{
loginLabel.Text = "Error logging in with your username and password, please check and try again.";
}
}
Everything worked well. So i put a line in all the aspx pages(eg, shoppingcartcheckout.aspx) that a member can access in the pageload:
if (User.Identity.IsAuthenticated)
{
...do whatever here
}
else{
Response.Redirect("login.aspx")
}
I've a scenario here
Whenever i try to access shoppingcartcheckout.aspx without login, it prompts me to login.aspx... which is what i wanted, but after i successfully login, it redirects me to Default.aspx. I want to go back to that shoppingcartcheckout.aspx instead of Default.aspx and i've go and click shopping cart> checkout again..
Any help,?