473,505 Members | 14,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

use AxWebBrowser to get the HTML source of a page in frameset?

Hello,

A frameset contains 3 html pages: page A, page B and page C. I need to get
the HTML source of page B. I tried to use AxWebBrowser to do that, but
failed. Do you have any idea?

Thanks,
Simon
Nov 16 '05 #1
2 2903
Simon,

If you have the page loaded in a web browser control, then you should be
able to get the IHTMLWindow2 interface that represents the main page in the
web browser control. Once you have that, you can use the frames property to
access the frames and the content in each of them.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Simon" <Si***@discussions.microsoft.com> wrote in message
news:0F**********************************@microsof t.com...
Hello,

A frameset contains 3 html pages: page A, page B and page C. I need to get
the HTML source of page B. I tried to use AxWebBrowser to do that, but
failed. Do you have any idea?

Thanks,
Simon

Nov 16 '05 #2
Nicholas,

Thanks for your reply.

mshtml.HTMLDocument htm = (mshtml.HTMLDocument)axWebBrowser1.Document;
I can use "htm.frames.length.ToString()" to get the frame's length. But
while I try to use "htm.frames[2].Document.documentElement.innerText" to get
the HTML source, it said "Cannot apply indexing with [] to an expression of
type 'mshtml.FramesCollection'". Do you know how to resolve it?

Thanks,
Simon

"Nicholas Paldino [.NET/C# MVP]" wrote:
Simon,

If you have the page loaded in a web browser control, then you should be
able to get the IHTMLWindow2 interface that represents the main page in the
web browser control. Once you have that, you can use the frames property to
access the frames and the content in each of them.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Simon" <Si***@discussions.microsoft.com> wrote in message
news:0F**********************************@microsof t.com...
Hello,

A frameset contains 3 html pages: page A, page B and page C. I need to get
the HTML source of page B. I tried to use AxWebBrowser to do that, but
failed. Do you have any idea?

Thanks,
Simon


Nov 16 '05 #3

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

Similar topics

4
3772
by: Martin Ho | last post by:
Hey Everyone, I really hope there is someone who can figure out this problem. Honestly, I spent 3 days now trying to find the solution, but nothing works. I'll try to explain the problem...
11
1942
by: Brett | last post by:
In Yahoo mail, I click the Inbox link and see my messages. If I view source, I don't have HTML which contains the URL of each message. The source HTML contains javascripting and framesets. This...
3
2959
by: Michael C | last post by:
Hi all, Quick question about the AxSHDocVw.AxWebBrowser Component. I was wondering if there is a way to view pages generated internally within my application without writing them to disk. For...
0
353
by: Simon | last post by:
Hello, mshtml.HTMLDocument htm = (mshtml.HTMLDocument)axWebBrowser1.Document; While I tried to use "htm.frames(2).Document.documentElement.innerText" to get HTML source, it said "Cannot apply...
8
4778
by: Nabor Gilgalad | last post by:
Hello Newsgroup, I have a simple question I think, but after a long time searching, get no answer. I want to get the original html source code from a page loaded in the AxWebBrowser Control. ...
5
1802
by: Thom Little | last post by:
I have a windows application that has an update form that uses AxWebBrowser to connect to a distribution site. This site uses a Response.Redirect to download of either a .msi file or a .zip file....
6
3758
by: Dave Booker | last post by:
It appears that I cannot correctly install the AxWebBrowser in VS2005. I can instantiate an "AxWebBrowser browser" and refer to its members, properties, and methods. I'm having trouble with the...
0
1137
by: thirunavukarasukm | last post by:
Hai. I created one windows application.I am add reference control to add Microsoft WebBrowser Control..In my application I am using HTTPWebRequest and HttpWebResponse class .To request...
2
2103
by: Michael | last post by:
Hi experts, I am using axWebBrowser in windows form to load web pages. There is a page that contains a group of buttons. (More than 10 buttons.) The source code behind each button is like below:...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
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...
0
7367
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...
1
7018
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
5613
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
4699
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...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
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 ...

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.