473,406 Members | 2,620 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,406 software developers and data experts.

Accessing components on other pages

CJ
I have a page with a bunch of iframes (which make up a tab control).
At least one of these iframes contains an aspx page, which in turn
contains a .ascx component. This component then contains a datagrid.

Is there any way that I can access this datagrid from one of the other
iframes? The grid contains a template column containing checkboxes, and
I need to access the rows for which the checkbox is selected from this
other iframe. Since it's a templatecolumn, I can't just put the
underlying dataset in the session state and retrieve it from the other
page; I *could* maintain a second dataset containing just the selected
rows, which I update whenever a checkbox's state changes, but that just
seems incredibly slow and clumsy.

Is there any way I can do this?

Dec 9 '05 #1
3 1400
You can talk between pages and compontents using javascript at the client
side, as long as you dont subject the browser to a cross site scripting
attack which is what normally happens when communciating between iframes.
Theres a good example of talking to an iframe from within a page here that
should get you started.

http://www.dyn-web.com/dhtml/iframes/

You cant talk to a iframes content if its not from the same domain, only to
the iframe object.

See:
http://msdn.microsoft.com/workshop/a...g_security.asp

iFrames are a pain to work with, you might be better off using divs.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"CJ" <cj*****@mail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a page with a bunch of iframes (which make up a tab control).
At least one of these iframes contains an aspx page, which in turn
contains a .ascx component. This component then contains a datagrid.

Is there any way that I can access this datagrid from one of the other
iframes? The grid contains a template column containing checkboxes, and
I need to access the rows for which the checkbox is selected from this
other iframe. Since it's a templatecolumn, I can't just put the
underlying dataset in the session state and retrieve it from the other
page; I *could* maintain a second dataset containing just the selected
rows, which I update whenever a checkbox's state changes, but that just
seems incredibly slow and clumsy.

Is there any way I can do this?

Dec 9 '05 #2
CJ
The page I want to access the grid from is also an asp.net page, so it
doesn't have to be clientside access; in fact, it *shouldn't* be
because I need to pass the selected items from the grid to another .net
method running on the server. So I guess the question is, from within
an asp.net page, can I access a datagrid in an asp.net custom control
on a different asp.net page, which sits within an iframe within a third
asp.net page?

Put like that, it sounds rather hopeless.

I know that iframes are a pain to work with; unfortunately it's a
project that I've inherited so I don't have much choice. Thanks for
the links, they might not help to solve this problem but they should
help me understand iframes better!

John Timney ( MVP ) wrote:
You can talk between pages and compontents using javascript at the client
side, as long as you dont subject the browser to a cross site scripting
attack which is what normally happens when communciating between iframes.
Theres a good example of talking to an iframe from within a page here that
should get you started.

http://www.dyn-web.com/dhtml/iframes/

You cant talk to a iframes content if its not from the same domain, only to
the iframe object.

See:
http://msdn.microsoft.com/workshop/a...g_security.asp

iFrames are a pain to work with, you might be better off using divs.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"CJ" <cj*****@mail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a page with a bunch of iframes (which make up a tab control).
At least one of these iframes contains an aspx page, which in turn
contains a .ascx component. This component then contains a datagrid.

Is there any way that I can access this datagrid from one of the other
iframes? The grid contains a template column containing checkboxes, and
I need to access the rows for which the checkbox is selected from this
other iframe. Since it's a templatecolumn, I can't just put the
underlying dataset in the session state and retrieve it from the other
page; I *could* maintain a second dataset containing just the selected
rows, which I update whenever a checkbox's state changes, but that just
seems incredibly slow and clumsy.

Is there any way I can do this?


Dec 9 '05 #3
This is very hard to do server side, as you have to capture the output of
any page before its rendered and delivered - in order of execution.

Have a read of Riks blog for an example of capturing page output and see eif
you can work out a way of making the server side access work.
http://west-wind.com/weblog/posts/481.aspx

The difficulty will probably be in ensuring the pipeline renders the pages
in the correct order.

John Timney
ASP.NET MVP
Microsoft Regional Director

"CJ" <cj*****@mail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
The page I want to access the grid from is also an asp.net page, so it
doesn't have to be clientside access; in fact, it *shouldn't* be
because I need to pass the selected items from the grid to another .net
method running on the server. So I guess the question is, from within
an asp.net page, can I access a datagrid in an asp.net custom control
on a different asp.net page, which sits within an iframe within a third
asp.net page?

Put like that, it sounds rather hopeless.

I know that iframes are a pain to work with; unfortunately it's a
project that I've inherited so I don't have much choice. Thanks for
the links, they might not help to solve this problem but they should
help me understand iframes better!

John Timney ( MVP ) wrote:
You can talk between pages and compontents using javascript at the client
side, as long as you dont subject the browser to a cross site scripting
attack which is what normally happens when communciating between iframes.
Theres a good example of talking to an iframe from within a page here
that
should get you started.

http://www.dyn-web.com/dhtml/iframes/

You cant talk to a iframes content if its not from the same domain, only
to
the iframe object.

See:
http://msdn.microsoft.com/workshop/a...g_security.asp

iFrames are a pain to work with, you might be better off using divs.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"CJ" <cj*****@mail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
>I have a page with a bunch of iframes (which make up a tab control).
> At least one of these iframes contains an aspx page, which in turn
> contains a .ascx component. This component then contains a datagrid.
>
> Is there any way that I can access this datagrid from one of the other
> iframes? The grid contains a template column containing checkboxes, and
> I need to access the rows for which the checkbox is selected from this
> other iframe. Since it's a templatecolumn, I can't just put the
> underlying dataset in the session state and retrieve it from the other
> page; I *could* maintain a second dataset containing just the selected
> rows, which I update whenever a checkbox's state changes, but that just
> seems incredibly slow and clumsy.
>
> Is there any way I can do this?
>

Dec 9 '05 #4

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

Similar topics

1
by: Hal Vaughan | last post by:
I have a panel in a GUI that has three components: A JTextArea, a JCheckBox and a JButton. When the button is pressed, I want to check the value of the checkbox and get the text of the textarea...
6
by: Mario T. Lanza | last post by:
Greetings, I don't know about you guys but on many occasions I've asked myself whether or not someone else has solved a particular programming issue -- whether or not they developed a clever...
1
by: R | last post by:
Hello, I have a frame in which there are 2 IFrames., both being loaded from the same domain. One IFrame is loaded from http://test1.xyz.com and the other IFrame is loaded from...
1
by: Salek Talangi | last post by:
Hello, I have following (probably very basic) problem: I made a html-frameset in VS.net, where the frames itself are aspx-pages with webforms. Now I want to access the webforms (eg. give a label...
1
by: Johan Riis Johansen | last post by:
Hi Folks! A few tips or pointers on this one would be appriciated. Presently I'm working on a webproject, and I've decided to create a class that acts as template for all pages on the site....
3
by: Alex | last post by:
I'm having a problem porting an ASP solution to ASPX. In the ASP solution I'm accessing a DCOM server, create sub DCOM objects and call functions from VB script on the ASP pages. The DCOM object...
5
by: gemel | last post by:
I have a wireless networked peer-to-peer LAN and I can access web pages on the Internet. I have a development platform for ASP and I can access all pages on this machine by using the localhost...
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
0
by: Mark | last post by:
I have an asp.net application that when accessed by users not using proxy servers there are no problems. When a user using a proxy tries to access the site they access the site ok but when they...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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.