Click here to Skip to main content
12,746,535 members (30,924 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET

how to access all controls of any webpage in iframe in using c#

thank u

i use other site in iframe which is use on my page and how to find other site controls in my iframe,

for example , gmail login page is loagin in my iframe and how to get control of gmail login page in my website,
Posted 7-Dec-12 0:25am
Updated 7-Dec-12 0:36am
choudhary.sumit 7-Dec-12 5:28am
wat you mean by access all controls? explain in detail..
Krunal Rohit 7-Dec-12 5:33am
Any efforts so far ??
Jaypal@18 7-Dec-12 5:41am
ya , i am using webbrowser.document.getelementsbytagname("input") in htmlElementCollection but its not working
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

First create normal aspx page then call iframe like

<iframe id="sample" frameborder="0" src="YourPageName.aspx" height="300px" style="width: 100%;" scrolling="auto"></iframe>;

Then you call the iFrame Contents through javascript.

For Example i am using upload control inside the iFrame page. I access the control using client side code

var iFrameId = document.getElementById('sample');
// following will work on same domain (or subdomain with document.domain set) only
var fraContent = iFrameId.contentDocument || iFrameId.contentWindow.document;
var uploadTxt = fraContent.getElementById('FU_ReplyMail').value;
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

If u succeed in what you are trying to achieve, tell us all. That way we all can know the user ids and password of all gmail users...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170215.1 | Last Updated 7 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100