This topic is locked

New with question

2/18/2009 1:54:13 AM
ASPRunnerPro General questions
R
Roger author

Just downloaded and have a question.
When a user logs in, i would like to redirect them to a page that makes them enter additional information.
For example, bob logs in, his profile is not complete, and i would like to redirect the user to a page to enter aditional information.
Like so:
Accounts (master)-> Account Profile. Account.active = false, redirect to AccountProfile (child table, related 1:1) page based on account no (example = 9999)
Tried using dal, but so new at this that this will take a while to learn and master. Don't want to use sql statement and select if avoidable (dal shoud help here, yes???).
thanks.

J
Jane 2/19/2009

Hi,
use AfterSuccessfulLogin event on the Events tab for this purpose.

Here is a sample:

set rstmp = dal.Account.Query("UserNameField='" & username & "' and PasswordField='" & password & "'","")

if rstmp("active")=False then

Response.Redirect "AccountProfile_edit.asp?editid1=" & rstmp("account no")

end if

rstmp.Close : set rstmp = nothing

R
Roger author 2/19/2009

Thank you Jane. It's appreciated.