This topic is locked

Display a message after adding a record and redirecting to the List page

5/13/2016 11:05:07 PM
ASPRunnerPro Tips and tricks
admin

We need to redirect user back to the List page right after new record was added. We also need to indicate somehow that record was added successfully. Here is how this can be done.

  1. AfterAdd event

Session("message") = "Record was added"

Response.Redirect "tablename_list.asp?a=return"


2. On the List page insert a code snippet where you want this message to appear and insert the following code there:

if Session("message")<>"" then

Response.Write Session("message")

Session("message") =""

end if