473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Pass a parameter from one page to the other page with iFrame tag

Hello,

I'm still using the Framework v1.1. Forgive me, I'm working on a legacy
application.
I'm using 2 iFrame sections with 2 aspx pages, i.e. 1.aspx (left) and 2.aspx
(right)
In 1.appx page, I have a treeview control, I'd like to pass a selected node
string to 2.aspx page and then to display some contents with passed node
string.
How could I accomplish that? The task is to pass the string parameter and
then invoke the 2.aspx page to refresh the display.

I'd appreciate for getting any help.
--
Doing software as simple as possible
Nov 24 '06 #1
2 3330
If you've got two separate .aspx pages each loaded into an IFRAME, and you
need for the second page to get a querystring parameter when something
happens in the first, then you have to make the second IFRAME reload it's
page, with the querystring appended at the end so your code in your second
page's Page_Load handler can check for it and react. Right?
So, you could either try making the second IFRAME runat=server and reset
it's src property, or you could do it with client script with something *like*

document.Frames[1].src="xxxx?id=yyyy";

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"bbsbob" wrote:
Hello,

I'm still using the Framework v1.1. Forgive me, I'm working on a legacy
application.
I'm using 2 iFrame sections with 2 aspx pages, i.e. 1.aspx (left) and 2.aspx
(right)
In 1.appx page, I have a treeview control, I'd like to pass a selected node
string to 2.aspx page and then to display some contents with passed node
string.
How could I accomplish that? The task is to pass the string parameter and
then invoke the 2.aspx page to refresh the display.

I'd appreciate for getting any help.
--
Doing software as simple as possible
Nov 24 '06 #2
Hi, Peter,

Very appreciate for your reply!

I'd prefer using the code behind pattern. Could you please show me the
syntax in C#? The following is my code example:

From 1.aspx, user selected a node from a treeview control:

private void OrganTree_SelectedIndexChange(object sender,
Microsoft.Web.UI.WebControls.TreeViewSelectEventAr gs e)
{
string NodeCode = e.NewNode.ToString();
}

From 2.aspx, I'd expect to get the selected tree node string.

private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if( !IsPostBack )
{
}
}

My question is how to trigger 2.aspx to react from 1.aspx after a user action?

Thank you so much!
bbsbob
--
Doing software as simple as possible
"Peter Bromberg [C# MVP]" wrote:
If you've got two separate .aspx pages each loaded into an IFRAME, and you
need for the second page to get a querystring parameter when something
happens in the first, then you have to make the second IFRAME reload it's
page, with the querystring appended at the end so your code in your second
page's Page_Load handler can check for it and react. Right?
So, you could either try making the second IFRAME runat=server and reset
it's src property, or you could do it with client script with something *like*

document.Frames[1].src="xxxx?id=yyyy";

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"bbsbob" wrote:
Hello,

I'm still using the Framework v1.1. Forgive me, I'm working on a legacy
application.
I'm using 2 iFrame sections with 2 aspx pages, i.e. 1.aspx (left) and 2.aspx
(right)
In 1.appx page, I have a treeview control, I'd like to pass a selected node
string to 2.aspx page and then to display some contents with passed node
string.
How could I accomplish that? The task is to pass the string parameter and
then invoke the 2.aspx page to refresh the display.

I'd appreciate for getting any help.
--
Doing software as simple as possible
Nov 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Belinda | last post by:
Hello All I have the following test.asp page which needs one parameter querystr but my querystr is a very long string value. When I send a long value the query string is getting truncated after...
5
by: Julien C. | last post by:
Hi all, I have an "EditeItem.aspx" page which lets me edit properties of an "Item". In the OnClick() event of my Save button, I do save Item changes to the database and then I redirect the user...
3
by: Chris | last post by:
I have a modal (yes it must be modal) web page. I do this by having an empty frame that points to my main page (so that I can repost without new popups) I have to pass data to the child page from...
3
by: Peter | last post by:
I have a webform on this form is a User Control and another webform in IFRAME On the User Control there is a save button. I want to click this button and somehow tell the webpage in IFRAME that...
4
by: Rod | last post by:
I've got 2 ASP.NET WebPages that I've written in VB.NET 2003. One of them has several controls on it, including at the bottom of the page an IFrame. The second ASP.NET page is supposed to have...
5
by: Tudor Tihan | last post by:
Hi, This is my first post here, so please be kind. I have tryed to make a javascript html page loader by using an invisible <IFrame> and some javascript variable text passing between...
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Is there an easier way to handle that? I used Javascript to handle this when our two domains are hosted on two different servers(on different networks) and our search engine marketing...
4
by: ismailc | last post by:
Hi, I need help please. I need to create a textbox with a report url in an iframe below. Onclick of button create IFrame and pass textbox value into parameter of iframe src. I'm not to sure...
34
by: ismailc | last post by:
Good day, not sure what to do. I have an ascx page with the code displaying the user logged in, i created an iframe src displaying a report but i want to add the logged in id as parameter but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.