473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 2897
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.