rodmjay
asked on
FormsAuthentication from non login page
I am trying to create a login system from a page other than login.aspx, as a matter of fact it is the home page itself. I know that this must be an easy question but ive been working on it for a little while now to no avail. I need to authenticate the user and redirect to a page. Simple. This is not the login.aspx page although there is this page available.
here is the code i am using to no avail, ive tried other things too but they didnt work either
If Membership.ValidateUser(tx tUserName. Text, txtPassword.Text) Then
If FormsAuthentication.Authen ticate(txt UserName.T ext, txtPassword.Text) Then
Response.Redirect("~/Insti tute/MyIns titute.asp x")
End If
End If
here is the code i am using to no avail, ive tried other things too but they didnt work either
If Membership.ValidateUser(tx
If FormsAuthentication.Authen
Response.Redirect("~/Insti
End If
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Great! Glad I helped a bit. Glad you found an answer that solved the problem.
Davin
Davin
ASKER
<authentication mode="Forms">
<forms loginUrl="login.aspx"
defaultUrl="~/Institute/My
</authentication>