Upgrading HTML to ASP.NET 2.0

G

Guest

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 do so over time.

The question is: can we use our existing HTML files as content in a Master
page? If so, how?

Thanks,
PAGates
 
M

Mark Rae

The question is: can we use our existing HTML files as content in a Master
page?

Not natively. The Master / Content relationship requires .aspx and .master
files because they need to be processed by ASP.NET and rendered into HTML to
be streamed down to the client.

Even if you were to rename your .html files to .aspx, you would still get
lots of errors because content pages can't contain page markup like <html>,
<head>, <body> etc.

You could, I suppose, strip off the page markup from your HTML files and
then surround the remaining content with <asp:Content> tags, or even write
some sort of routine which did this at runtime on the fly...

However, unless you have thousands of HTML pages, it's probably quicker in
the long run to bite the bullet and convert them to content pages.

Once you've done a couple, you'll realise that it's quite a simple process.

How many HTML pages are we talking about, AAMOI...?
 
D

darrel

We have a website that we want to eventually convert from pure HTML to
ASP.NET pages.

It doesn't really work that way.

What you need to do is migrate your content from a static site to a site
runing asp.net. Likely some sort of asp.net content management system, I
imagine.

Point being, you're likely not going to use much, if anything of the old
site other than the content. It'll likely be a lot of cutting and pasting
and manual clean up of the content and then importing that into the new
application that you build.

It will likely make more sense to do it en masse rather than bit-by-bit.

-Darrel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,237
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top