Click here to Skip to main content
15,904,823 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I created two forms. The source form contains a button with OnClientClick="javascript:window.open('Lookup.aspx');return false;"

Lookup contains a gridview. Once the user selects a row, I want to:

1. Call a method that updates objects on the source form based upon the id selected on "Lookup"

2. Close "Lookup".

Appreciate any assistance. Thanks.
Posted
Comments
codeBlazer 29-Oct-13 23:03pm    
Hi, When I need to pass data back I set a cookie and do a redirect to force a new page to reload. On page load the data fields get refreshed from data stored in the cookie.

1 solution

Different pages are independent, which rooted in the following facts: 1) each page is a response to a separate HTTP request, or more than one requests, 2) HTTP protocol is stateless:
http://en.wikipedia.org/wiki/HTTP[^],
http://en.wikipedia.org/wiki/Stateless_protocol[^].

It means that for communication between pages or even different HTTP request/responses to the same page, you need something to store the state. It could be a database or even a file on server side (which is hardly can be recommended due to lack of transactional properties). A server-side approach associated with session states is explained here:
http://en.wikipedia.org/wiki/HTTP#HTTP_session_state[^],
see also http://en.wikipedia.org/wiki/HTTP#HTTP_session[^].

Please start here: http://msdn.microsoft.com/en-us/library/ms178581.ASPX[^].

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900