473,385 Members | 1,766 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,385 software developers and data experts.

display an html file within a web form?

Hi
I need to open an html file from the file system and embed that html file
within my main aspx form.
I have 2 questions:
1) How do I open the html file? I tried the File.open(Path, mode) didnt work.
2) I would like to display the html file at a certain location in my main
aspx page. How can I achieve this?
I'm brain dead and I have to finish this tonight! Please help.

Thanks
V
Jul 21 '05 #1
5 2467
Does it have to be embedded in the page, or could you just use an iframe?

"Victor" <Vi****@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
Hi
I need to open an html file from the file system and embed that html file
within my main aspx form.
I have 2 questions:
1) How do I open the html file? I tried the File.open(Path, mode) didnt
work.
2) I would like to display the html file at a certain location in my main
aspx page. How can I achieve this?
I'm brain dead and I have to finish this tonight! Please help.

Thanks
V

Jul 21 '05 #2
Hi Peter
I dont know what the ramifications are using iframe vs embedded in the
page. I need to wrap this html document around an image. I've never used
iframes before. Is it a .net control? Can I access the iframe from the
codebehind page? Pls advise me.

THanks
V

"Peter Rilling" wrote:
Does it have to be embedded in the page, or could you just use an iframe?

"Victor" <Vi****@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
Hi
I need to open an html file from the file system and embed that html file
within my main aspx form.
I have 2 questions:
1) How do I open the html file? I tried the File.open(Path, mode) didnt
work.
2) I would like to display the html file at a certain location in my main
aspx page. How can I achieve this?
I'm brain dead and I have to finish this tonight! Please help.

Thanks
V


Jul 21 '05 #3
CMM
An iframe is a standard HTML element... do a search for it online. But, I
don't think it's in the VS toolbox. You can add it manually to the web form
(by switching to html View)... AND you can access the iframe from the
code-behind by adding the runat="server" attribute to it.

Having said that... you can just dump the contents of the html file into a
label or panel control. AFAIK all browsers know how to deal with nested
<HTML> and <BODY> tags and that shouldn't confuse them (though it might
violate some standards... I'm not sure).

"Victor" wrote:
Hi Peter
I dont know what the ramifications are using iframe vs embedded in the
page. I need to wrap this html document around an image. I've never used
iframes before. Is it a .net control? Can I access the iframe from the
codebehind page? Pls advise me.

THanks
V

"Peter Rilling" wrote:
Does it have to be embedded in the page, or could you just use an iframe?

"Victor" <Vi****@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
Hi
I need to open an html file from the file system and embed that html file
within my main aspx form.
I have 2 questions:
1) How do I open the html file? I tried the File.open(Path, mode) didnt
work.
2) I would like to display the html file at a certain location in my main
aspx page. How can I achieve this?
I'm brain dead and I have to finish this tonight! Please help.

Thanks
V


Jul 21 '05 #4
Thanks CMM.
I currently have the html file set to a literal control and it doesn't
wrap around the image. It acts like the html and image are in two different
table cells. I will try the iframe and try to embed the image as well in the
iframe and see if it works.

Thanks,
V

"CMM" wrote:
An iframe is a standard HTML element... do a search for it online. But, I
don't think it's in the VS toolbox. You can add it manually to the web form
(by switching to html View)... AND you can access the iframe from the
code-behind by adding the runat="server" attribute to it.

Having said that... you can just dump the contents of the html file into a
label or panel control. AFAIK all browsers know how to deal with nested
<HTML> and <BODY> tags and that shouldn't confuse them (though it might
violate some standards... I'm not sure).

"Victor" wrote:
Hi Peter
I dont know what the ramifications are using iframe vs embedded in the
page. I need to wrap this html document around an image. I've never used
iframes before. Is it a .net control? Can I access the iframe from the
codebehind page? Pls advise me.

THanks
V

"Peter Rilling" wrote:
Does it have to be embedded in the page, or could you just use an iframe?

"Victor" <Vi****@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com...
> Hi
> I need to open an html file from the file system and embed that html file
> within my main aspx form.
> I have 2 questions:
> 1) How do I open the html file? I tried the File.open(Path, mode) didnt
> work.
> 2) I would like to display the html file at a certain location in my main
> aspx page. How can I achieve this?
> I'm brain dead and I have to finish this tonight! Please help.
>
> Thanks
> V

Jul 21 '05 #5
CMM
You can try embedding the html together with the image's <img> tag in a label
(or maybe literal control?) control. It should wrap then.
iFrames are stoic... and hard to control their exact placement (they're
essentially floating frames).

"Victor" wrote:
Thanks CMM.
I currently have the html file set to a literal control and it doesn't
wrap around the image. It acts like the html and image are in two different
table cells. I will try the iframe and try to embed the image as well in the
iframe and see if it works.

Thanks,
V

"CMM" wrote:
An iframe is a standard HTML element... do a search for it online. But, I
don't think it's in the VS toolbox. You can add it manually to the web form
(by switching to html View)... AND you can access the iframe from the
code-behind by adding the runat="server" attribute to it.

Having said that... you can just dump the contents of the html file into a
label or panel control. AFAIK all browsers know how to deal with nested
<HTML> and <BODY> tags and that shouldn't confuse them (though it might
violate some standards... I'm not sure).

"Victor" wrote:
Hi Peter
I dont know what the ramifications are using iframe vs embedded in the
page. I need to wrap this html document around an image. I've never used
iframes before. Is it a .net control? Can I access the iframe from the
codebehind page? Pls advise me.

THanks
V

"Peter Rilling" wrote:

> Does it have to be embedded in the page, or could you just use an iframe?
>
> "Victor" <Vi****@discussions.microsoft.com> wrote in message
> news:67**********************************@microsof t.com...
> > Hi
> > I need to open an html file from the file system and embed that html file
> > within my main aspx form.
> > I have 2 questions:
> > 1) How do I open the html file? I tried the File.open(Path, mode) didnt
> > work.
> > 2) I would like to display the html file at a certain location in my main
> > aspx page. How can I achieve this?
> > I'm brain dead and I have to finish this tonight! Please help.
> >
> > Thanks
> > V
>
>
>

Jul 21 '05 #6

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

Similar topics

1
by: jomo | last post by:
Hi, I need some technical help. How do I generate a request from an HTML search form (or button/hyperlink) to search/query an XML data file, using CGI scripts, and have the results displayed...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
7
by: Winston | last post by:
Hi, I want to use the Webbrowser Control (the Internet Explorer Control) to display an XML-structure within a C# WinForm. The way the IE displays a XML-file in its native form is exactly what I...
7
by: TLM | last post by:
I am trying to build a web application that will contain links to files on a users local computer. I am assuming that the files will be in a known location and can display in a browser window. ...
5
by: Victor | last post by:
Hi I need to open an html file from the file system and embed that html file within my main aspx form. I have 2 questions: 1) How do I open the html file? I tried the File.open(Path, mode) didnt...
11
by: nickyeng | last post by:
I have a html file contains a form asking user to select a choice and press enter to pass the data to server. In server there, i have a cgi script(C language) that accepts the input from browser...
0
by: simon | last post by:
hello, relatively new to .net, i'm using vb.net and the 2.0 .net platform I'm trying to display a grid that has a text box on the left in one cell (with a hidden ID), which will be associated...
2
by: Tim Streater | last post by:
The following test page is intended to allow the user to choose an image file, and then display it. It works as expected in Safari 3.1.1, FF 2.0.0.14 (Mac), and IE7 (XP). But, it fails in FF...
1
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
I'm running VS2008 & attempting to solve a problem I've encountered while developing some software for our business. Here's the basic idea...I've created a class that represents a file (with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.