473,714 Members | 2,513 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1414
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.c om> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.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.c om> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.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.c om> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.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.c om> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.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
5164
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 and store the info in a file. I've found that the paramString() method for components is PROTECTED, so I can't get to it from another class. I tried declaring the component inside the class, like this: private class MyPanel extends JPanel...
6
2170
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 pattern for doing some task quite well. This usually leads me to a search on today's greatest technical tool, The Internet. I indefinitely uncover many potential code snippets, components, etc. and have to weed through them to find the best one...
1
3504
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 https://test1.xyz.com/test I am getting an error while accessing data in the HTTP IFRAME from the HTTPS IFRAME. Is it possible at all to access the data in the other IFrame, when the
1
2135
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 a text) from one .aspx.vb page. I managed to get all the code into one file by writing the same file in the codebehind statement of all aspx files. Now I have one big .aspx.vb file with:
1
1337
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. What all the pages do is inheirit from MyTemplatePage instead of System.Web.UI.Page. That works fine and everything. My problem actually stems from the fact that the same class has to be used for dictating the
3
2032
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 handles are stored in session variables. This works fine without a problem. Ported it to ASPX, accessing the same DCOM server from code behind pages. Still, usually no problems. However sometimes I'm seeing an error stating that the DCOM handle...
5
1256
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 address. However, if I try to access the development machine from another client on the LAN then I fail to access the server. The IIS on the server is set for Anonymous Access. Any clues please? Regards
0
12084
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 likelihood of CRM success from less than 20 percent to 60 percent. WHITEPAPER :
0
978
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 try to do anything on the site that causes a POST they error out. I can't describe the error because there are many components to our site including reverse proxies, netegrity siteminder authentication, other stuff.. So, the error is just a custom...
0
8704
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9171
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9071
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7946
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6629
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5945
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4717
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3156
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2107
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.