By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,251 Members | 2,727 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,251 IT Pros & Developers. It's quick & easy.

display an html file within a web form?

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.