Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Master / detail - updating master ID from detail page?

Status
Not open for further replies.

trium123

IS-IT--Management
Apr 8, 2005
15
GB
Hi All.
I have been trying to find the answer to a simple question, but from what i have found so far, it seems very complicated.
I have a small SQL database with a couple of web pages - master and detail. I can insert, update, delete entries on both pages with no problems - as long as i remember the "masterID" from the master page, when adding new records to the details page.
There lies my simple question - there must be a way of getting the details page to remember the masterID when i insert a new related record?
Someone has told me to use a session state - which is fine if you know what one is, but can someone now tell me how to use it? I can't believe that something so simple is so hard to do..
Thanks to anyone with the patience to help me - just a small HOWTO would be fine - thanks again.
Regards
Ian
 
You can pass data from one page to another using a few methods, some of which are:

1) A QueryString value (use the Request.Querystring method to retrieve the passed value)
2) A posted variable (i.e. set an standard input elements value)
3) A Session variable (use the Session.Add and Session.Item methods)


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Thanks for the suggestions, i did get a similar reply last week - sorry to sound idiotic but now can anyone explain to me how i create a session method?
Is there a guide anywhere that i can reference? Anywhere?
Something that explains in english how i create this?
Sorry to sound so pathetic but i'm genuinely stuck..
Thanks for your help.
 
MSDN has a help file for each class along with a list of it's methods and properties so that should be your first point of call. However, if you simply look at the two methods I stated above (Session.Add and Session.Item) it will be fairly self-explanatory.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top