This topic is locked

Capture RecordID from New Registration

7/20/2016 1:48:21 PM
ASPRunnerPro General questions
J
jmccullough author

Is it possible to capture in a session variable the recordid after a successful registration? I am trying to include the RecordID, UserName, and SchoolDistrict in the "Successful Registration" email. I am able to get the UserName and SchoolDistrict in my email but I am unable to get the RecordID. Is there a way to do this?
Using Asprunner Pro 7.2.
Thanks for any suggestions.

admin 7/20/2016

You can do that in AfterSuccessfulRegistration event:

http://xlinesoft.com/asprunnerpro/docs/after_successful_registration.htm
You will have to execute SQL query to retrieve that new ID from there database. Here is the sample code:

recordID = DBLookup("select id from LoginTable where username='" &userdata("username") & "'")