Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Passing Variables: How can I pass results of a record after insert to a separate page?

Posted on 2009-04-27
Medium Priority
Last Modified: 2012-05-06
Passing Variables: How can I pass results of a record after insert to a separate page?
I have a form that inserts properly, but want to pass over to another page with some results about the record to be displayed in labels.  What is the best way to do this?
Question by:devnewbee
LVL 12

Accepted Solution

wht1986 earned 2000 total points
ID: 24247271
Lots of ways I can think of.

(1) store everything to session after insert and grab them on 2nd page

but better

(2) After insert grab whatever primary id you have from the insert and append it to the querystring of the redirect

e.g.  After inserting some record on page 1, you get a primary key value of '7' return. When you do response redirect append the '7' like


then on page 2, you read the query string, then query the database based on the id.

I like the second approach because most of my apps lately are heavy usage, I try to minimize storing to session

Author Comment

ID: 24247383
can you give me and example of actually passign the scope identity after the insert with query string other than what you have shown.  You use the valu of "7" above.  I would not know the value.  Sorry these are fundamental questions.  I am new at this...

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question