473,808 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2519
Does it have to be embedded in the page, or could you just use an iframe?

"Victor" <Vi****@discuss ions.microsoft. com> wrote in message
news:67******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:67******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:67******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:67******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
> news:67******** *************** ***********@mic rosoft.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
3536
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 within an HTML page? Thanks in advance, Jomo
13
40778
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 style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
7
13994
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 need (as tree structure with plus/minus). This works great as long as I load the XML to display from a file with the Navigate2-method of the control. But my XML comes not from a file but is created dynamically during runtime.
7
6399
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. I have my ASP.NET application building links along the lines of file://c:/<path to file>
5
296
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 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
11
3200
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 and then output a html page to browser. The browser should open the page, but it didn't, instead, it prompt me to save the file(.cgi file i requested in form method).... how that happens? i want to display the html file that the script output...
0
2008
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 to multiple rows (events) on the right. each row on the right will also have a text box ------------------------------------------------------- event 1
2
8340
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 2.0.0.14 (Win-XP) - the image doesn't appear. The error console shows no errors and Page Info, under the media tab, shows no loaded image (in contrast to FF Mac which shows the image). The images I select are all jpegs, btw.
1
1604
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 members such as file name, file location, and a string containing the files data). Each file object also contains an ArrayList of another custom object I've created--a field object (which is basically two fields--field name & field data). These...
0
9600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10633
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10375
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10114
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6880
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4331
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 we have to send another system
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.