Request values from one aspx page to another

Hello there

I have a page1.aspx and an event occurence in page1.aspx pop-up page2.aspx. Now i can select some values in the dropdown lists from that page2.aspx as search criteria. Once the criteria matches the search returns a datagrid which has a select button. When I click on that button I return back to page1.aspx.

Now I need to request the selecteditem.values of the drop down lists from page2.aspx to page1.aspx as i need those two values as a input for a different event.

Can someone please help me?

Hard learner
Who is Participating?
b1xml2Connect With a Mentor Commented:
depends on how you open page2.aspx..."<url>","mywindow","<features>");
means the following would work
// force postback of parent page
// close popup page

// I use top because it is common to hold the aspx page in a popup window inside an IFRAME tag to allow postbacks to the popupwindow in dialog Windows (MSIE only)

/// window as the object is the correct code!
// force postback
// close popup page

simple way is this:
1. in page2.aspx, when you are ready, populate the Session with the values you are interested in
2. when page2.aspx closes, force a postback(like document.forms[0].submit();)
3. in page1.aspx, grab the session values and do what you want server-side...
hardlearnerAuthor Commented:
Thanx buddy...
Would you mind a little more help...

Suppose I create two literals a & b in page2.apsx and render the values of the dropdown lists to them like the following:   dropdown1.selecteditem.value=a and dropdown2.selecteditem.value=b. How exactly can i force a postback to be able to use those two values from page1.aspx?
I will be grateful if you can elaborate...

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

You can register call the client-side scripts when you are ready:


and inside the aspx page
<script language="javascript">
function reload() {
  ... code...

hardlearnerAuthor Commented:
hello Buddy... It surely was very helpful but I wish you were a VB.Net. Now I have to struggle for the equivalent syntax

thank you anyway
hardlearnerAuthor Commented:
Oh man... Just for your information... I am kinda new to this technology... I still have got some research to do on this now  :)

Hard learner is what i am :)

thank you
uhm, the code was in javascript... at the mo, nothing to do with VB.NET or C#. I am versatile across the 2 languages altho I personally prefer C#
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.