Hi,
I am trying to copy the contents of a FRAME inside a webpage opened in IE, I have been using this code :

IEnumerable<dynamic> FindAllIE()
        {
            var t = Type.GetTypeFromProgID("Shell.Application");
            dynamic o = Activator.CreateInstance(t);
            try
            {
                var ws = o.Windows();
                for (int i = 0; i < ws.Count; i++)
                {
                    var ie = ws.Item(i);
                    if (ie != null && System.IO.Path.GetFileName((string)ie.FullName) == "IEXPLORE.EXE")
                        yield return ie;
                }
            }
            finally
            {
                Marshal.FinalReleaseComObject(o);
            }
}

===========================
And then I use the following code to copy the text:

private void FindIEWindows()
        {
            foreach (var ie in FindAllIE())
            {
               IE_Window_Text = (string)ie.Document.body.innerText + Environment.NewLine;
            }
        }

==============================
The problem is that the text I get does not include the text inside the FRAMEs, as the webpage has some frames in it.

Is there a way to copy the text that inside a FRAME ??
Any help is appreciated and thanks in advance..

I would open a stream to the URI either using a WebClient .OpenRead() or using the HttpWebRequest.
See this post for the latter.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.