Click here to Skip to main content
15,797,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

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,
Updated 7-Dec-12 0:36am
choudhary.sumit 7-Dec-12 5:28am    
wat you mean by access all controls? explain in detail..
[no name] 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

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;
Share this answer
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...
Share this answer

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900