473,406 Members | 2,707 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,406 software developers and data experts.

Accessing a HTML document in a resouce dll

I am currently working on a C# application that uses an axWebBrowser
control which displays HTML pages. This is being done to reuse an
existing web application which resides on a client's computer. I
have created a resource .dll linking in all of the HTML, images and
JavaScript pages in the old project. Using the
res://mydll/homepage.htm, the home page loads into the web browser
control (axWebBrowser.Navigate). This page has frameset, so when I try
to access the document frames, I get an exception Access Denied.

I am using code similar to this to access the frames:

HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
FramesCollection c = myDoc.frames;

Object o = i;
i++;
Object c1 =null;

try
{
c1 = c.item(ref o);
}
catch(Exception ex)
{
Console.WriteLine(ex.Message)
}

Is this a way that I can dynamically change the frames depending on a
users action. I have no problem displaying the frames or using the
JavaScript when they are not in a resource dll. If there a different
technique, using the Document and JavaScript when they are contained in
a resource dll.

Thank you in advance for all of your time.

Jun 27 '06 #1
3 4905
How are you packaging the documents as a resource in the dll? The way
that .NET handles resources and the way that the web browser control expects
them are different.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"thompson_38" <th*********@hotmail.com> wrote in message
news:11*********************@j72g2000cwa.googlegro ups.com...
I am currently working on a C# application that uses an axWebBrowser
control which displays HTML pages. This is being done to reuse an
existing web application which resides on a client's computer. I
have created a resource .dll linking in all of the HTML, images and
JavaScript pages in the old project. Using the
res://mydll/homepage.htm, the home page loads into the web browser
control (axWebBrowser.Navigate). This page has frameset, so when I try
to access the document frames, I get an exception Access Denied.

I am using code similar to this to access the frames:

HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
FramesCollection c = myDoc.frames;

Object o = i;
i++;
Object c1 =null;

try
{
c1 = c.item(ref o);
}
catch(Exception ex)
{
Console.WriteLine(ex.Message)
}

Is this a way that I can dynamically change the frames depending on a
users action. I have no problem displaying the frames or using the
JavaScript when they are not in a resource dll. If there a different
technique, using the Document and JavaScript when they are contained in
a resource dll.

Thank you in advance for all of your time.

Jun 27 '06 #2
If I am answering your question correctly, I am building a C++ resource
library, I have added all of the HTML/JavaScript in the .rc file under
the HTML tag as follows
TIPS.HTM HTML "tips.htm"
HELP.HTML HTML "help.htm"
TIPS.JS HTML "tips.js"
STYLE.CSS HTML "style.css"

Nicholas Paldino [.NET/C# MVP] wrote:
How are you packaging the documents as a resource in the dll? The way
that .NET handles resources and the way that the web browser control expects
them are different.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"thompson_38" <th*********@hotmail.com> wrote in message
news:11*********************@j72g2000cwa.googlegro ups.com...
I am currently working on a C# application that uses an axWebBrowser
control which displays HTML pages. This is being done to reuse an
existing web application which resides on a client's computer. I
have created a resource .dll linking in all of the HTML, images and
JavaScript pages in the old project. Using the
res://mydll/homepage.htm, the home page loads into the web browser
control (axWebBrowser.Navigate). This page has frameset, so when I try
to access the document frames, I get an exception Access Denied.

I am using code similar to this to access the frames:

HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
FramesCollection c = myDoc.frames;

Object o = i;
i++;
Object c1 =null;

try
{
c1 = c.item(ref o);
}
catch(Exception ex)
{
Console.WriteLine(ex.Message)
}

Is this a way that I can dynamically change the frames depending on a
users action. I have no problem displaying the frames or using the
JavaScript when they are not in a resource dll. If there a different
technique, using the Document and JavaScript when they are contained in
a resource dll.

Thank you in advance for all of your time.


Jun 27 '06 #3
I have been unsuccessful in finding information pertaining to this
subject, anyone have an idea?

thompson_38 wrote:
If I am answering your question correctly, I am building a C++ resource
library, I have added all of the HTML/JavaScript in the .rc file under
the HTML tag as follows
TIPS.HTM HTML "tips.htm"
HELP.HTML HTML "help.htm"
TIPS.JS HTML "tips.js"
STYLE.CSS HTML "style.css"

Nicholas Paldino [.NET/C# MVP] wrote:
How are you packaging the documents as a resource in the dll? The way
that .NET handles resources and the way that the web browser control expects
them are different.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"thompson_38" <th*********@hotmail.com> wrote in message
news:11*********************@j72g2000cwa.googlegro ups.com...
I am currently working on a C# application that uses an axWebBrowser
control which displays HTML pages. This is being done to reuse an
existing web application which resides on a client's computer. I
have created a resource .dll linking in all of the HTML, images and
JavaScript pages in the old project. Using the
res://mydll/homepage.htm, the home page loads into the web browser
control (axWebBrowser.Navigate). This page has frameset, so when I try
to access the document frames, I get an exception Access Denied.

I am using code similar to this to access the frames:

HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
FramesCollection c = myDoc.frames;

Object o = i;
i++;
Object c1 =null;

try
{
c1 = c.item(ref o);
}
catch(Exception ex)
{
Console.WriteLine(ex.Message)
}

Is this a way that I can dynamically change the frames depending on a
users action. I have no problem displaying the frames or using the
JavaScript when they are not in a resource dll. If there a different
technique, using the Document and JavaScript when they are contained in
a resource dll.

Thank you in advance for all of your time.


Jun 28 '06 #4

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

Similar topics

1
by: Julius Mong | last post by:
Dear all, I have something like this: <html... > <embed ...> </html> Am I out of luck if I wanted to access the embedded DOM and manipulate its content? Or if I have:
6
by: Nolan Martin | last post by:
Hello, I was wondering if it were possible to access the vtable directly. Are there any resources that detail the inner workings of the vtable?
5
by: Craig Anderson | last post by:
Can anyone tell me the best way to access a hidden object in a form? I could use a hard-coded index to the elements of the form, but it's too easy to add something before the hidden object and mess...
5
by: Rune Runnestř | last post by:
How do I focus the cursor in the input field 'numberField' when accessing this jsp-file (or html-file) ? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>...
6
by: Chris Styles | last post by:
Dear All, I've been using some code to verify form data quite happily, but i've recently changed the way my form is structured, and I can't get it to work now. Originally : The form is...
19
by: k.karthikit | last post by:
Hello all, In some hidden variable (<input type="hidden" name="hiddenId" value="test" /> ,i stored some value.I accessed the value "test" using var id = document.getElementById( 'hiddenId' );...
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
3
by: kosmodisk | last post by:
Hi, I'm having problem accessing javascript-created elements from opened window. This occurs only when I'm including another files in opened window, javascript or css. When I comment out...
3
by: judy.j.miller | last post by:
Does anyone know why i can't access a form element value using dot notation in firefox, when i'm in a function. Works ok in the body. I'm trying to do this: var FarTemp = faren.temp.value; I...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.