Link to home
Start Free TrialLog in
Avatar of hardlearner
hardlearner

asked on

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
Avatar of b1xml2
b1xml2
Flag of Australia image

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...
Avatar of hardlearner
hardlearner

ASKER

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...




ASKER CERTIFIED SOLUTION
Avatar of b1xml2
b1xml2
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can register call the client-side scripts when you are ready:

Page.RegisterClientScriptBlock("reload","<script>reload();</script>")

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

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
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#