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

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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

#1 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 16044
  • Joined: 03-February 03

Posted 14 May 2016 - 03:05 AM

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

Best regards,
Sergey Kornilov
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic