This topic is locked

Redirecting to the updated 'view' page after edit

1/27/2007 5:49:01 PM
ASPRunnerPro General questions
G
Greg Cantwell author

Great product!

How do I redirect to the updated "view" page using the "Save" button on the edit page?
Thanks in adavnce

J
Jane 1/29/2007

Greg,
use After record added event on the Events tab for this purpose.

Here is a sample code:

Sub AfterEdit()

'** Redirect to another page ****

Response.Redirect "TableName_view.asp?editid1="&keys("FieldName")

End Sub



where FieldName is your actual field name where primary key is stored, TableName is your actual table name.

G
Greg Cantwell author 1/29/2007

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=14993&image=1&table=forumreplies' class='bbc_emoticon' alt='B)' />
That worked perfect!!!

Thank you very much!!!

Greg,

use After record added event on the Events tab for this purpose.

Here is a sample code:
where FieldName is your actual field name where primary key is stored, TableName is your actual table name.