You have 2 method to create a registration page:
1° method) You need use my AdvMail extension and the standard Insert Record Dw server behavior.
- Create a 1° page with the registration form
- Apply to this page the standard Insert Record Dw server behavior and insert the data in the Db
- Redirect to a 2° page
- in the second page create a query to retrieve the last record Id from your Db.
- Redirect to a 3° page and pass to this page the record id in the queryString
- In this page apply my extension without form or any other visual code (only my extension).
- In this page, with my extension, create a query to get the values from the record inserted**
and set all the parameters for the mail you need send.
** To create the query to get the last record you have 2 method:
1°) use the "order by" in the sql and order for the ID field in DESC mode, so the first record will be the record you find. In this case you must also put the "TOP 1" parameters in the select.
The result query must be:
SELECT TOP 1 YourTable.* from YourTable ORDER BY ID DESC
this will give you the last record.
2°)Insert an hidden field in the form like
<input type=hidden name=sessionId value="<%=session.sessionId%>" >
Insert a Field in the DB and call this field SessionId
In the insert behavior put the value of the sessionId form field in the sessionId DB field.
Create the query to get the field like:
"SELECT TOP 1 YourTable.* from YourTable where SessionId = '" & session.sessionId & "' ORDER BY ID DESC"
The second is a method more sure because if there are 2 user that create the record in the same time with the second you will be sure to get the right record.
2° method) You need my AdvMail extension and my PlugIn
With my plugIn you can do all in the same page so
Create a page with the registration form
- Apply to this page extension and set all the parametrs for the mail you need send
- Apply the InsertRecord PlugIn to insert the data from the form to the Db