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

Html page with master page

Hi everybody.

I am converting existing web site to asp 2.0. We have a bunch of Html files
that I want to show inside of our master page I do not want to covert
existing html pages to aspx pages or user controls. Is there any way to do
this?

Thanks in advance
Dec 4 '06 #1
2 1231
You could have an HtmlGenericControl("div") in the contentplaceholder, and
load the HTML of the requisite html page using a filestream, then attach the
resulting string of HTML markup to the InnerHtml property of your div.
Probably six other ways to do it, but that was the first one that came to my
feeble mind.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Leon" wrote:
Hi everybody.

I am converting existing web site to asp 2.0. We have a bunch of Html files
that I want to show inside of our master page I do not want to covert
existing html pages to aspx pages or user controls. Is there any way to do
this?

Thanks in advance
Dec 4 '06 #2
Peter. Thanks for your reply.

I put VB code like:

Dim lcFileName As String = Server.MapPath("MyHtm.htm")
Dim strInnerHtml As String = String.Empty
Dim sReader = New IO.StreamReader(lcFileName)
While (sReader.Peek -1)
strInnerHtml &= sReader.ReadLine.ToString '& vbNewLine
End While

divTemplate.InnerHtml = strInnerHtml

For some reason new page looks a little bit different from original.
Some spaces that original page had disappeared. Do you have any idea why? Or
if you can prompt me other ways to accomplish that, may be they would work
for me a little bit better.

Thanks again.
"Peter Bromberg [C# MVP]" wrote:
You could have an HtmlGenericControl("div") in the contentplaceholder, and
load the HTML of the requisite html page using a filestream, then attach the
resulting string of HTML markup to the InnerHtml property of your div.
Probably six other ways to do it, but that was the first one that came to my
feeble mind.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Leon" wrote:
Hi everybody.

I am converting existing web site to asp 2.0. We have a bunch of Html files
that I want to show inside of our master page I do not want to covert
existing html pages to aspx pages or user controls. Is there any way to do
this?

Thanks in advance
Dec 4 '06 #3

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

Similar topics

0
by: Sascha Folville | last post by:
Hi, I'm trying to transform a XML document to PDF using apache (xerces). I want different formatting for first and last page. My code looks like this: <fo:layout-master-set>...
0
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as ...
2
by: Alex Maghen | last post by:
I have a site where most of the pages will have a common "shell" or layout. There will be an outer table which will hold HTML elements but which will *also* hold UserControls (Global Nav, etc.)....
1
by: John | last post by:
Hi I have an existing layout in the form of an html page. I need to turn this into a master page. Are there any step by step instructions to do this eg how do I turn specific areas into master...
2
by: CharlesA | last post by:
Hi folks, I'm using ASP.net with Framework vs 1.1 I'm inheriting from a custom rolled master page class that is just that a class that inherits from web.ui.page but it has no designer associated...
4
by: Not Me | last post by:
Hi, I'm trying to translate a page into asp.net 2.0.. The options I need are e.g. action='some webpage', method=post, enctype='enctype' etc... the file is supplied by a standard file input...
2
by: pagates | last post by:
Hello All, Newbie question alert! We have a website that we want to eventually convert from pure HTML to ASP.NET pages. Unfortuantely, we cannot do this all at once, but rather, will likely...
4
by: brett | last post by:
How can I use an HTML FORM tag on a content page that uses a Master page? The HTML FORM is now inside the Master page serverside FORM. I need to use the HTML FORM on a few pages. Thanks, Brett
3
by: Admin.TalkPC | last post by:
Hi Guys I have an ASP.NET project with a rough layout as shown below Default.aspx Login.aspx Site.master web.config /IMAGES/Image1.jpg
4
by: Cirene | last post by:
I am using VS.NET 2008. In Dreamweaver you can create page templates (equivalent to Master Pages) and make HTML documents based on them. In VS.NET can you have a HTML file linked to a Master...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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:
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
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
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.