View Full Version : Converting ASP to HTML +CSS
RCMV
December 3rd, 2004, 16:41
I have just been asked if I could take over a website which was done in ASP and maintain it. I have NO experience with ASP, so I am wondering if it is possible to convert to html / CSS and if so, how hard it would be to accomplish this.
When I have an answer, then I can provide an answer to potential client.
Thanks everyone,
Ross
the_pm
December 3rd, 2004, 16:55
The whole idea of turning ASP into HTML/CSS is akin to turning bacon into a fruit. Doesn't make sense? Exactly ;)
ASP outputs HTML/CSS when it reaches the browser. You could very easily view the source of every page generated via ASP, grab it and save it as HTML documents, but I think you'd be better served to find out what the purpose of employing the ASP platform was in the first place. If it's something as complex as database-driven content, you might want to consider "skinning" around the given mechanisms (not that hard to do, actually). If it's something simple, like a system of includes, you might want to take advantage of them.
For example, take a look at the source of this test page: http://www.gasserjewelers.com/test/index.asp
Here's the source of the file I uploaded, before it gets processed:
[syntax:fa623f4087="asp"]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>John Gasser and Son Jewelers</title>
<!-- #include virtual="/inc/headers.asp" -->
</head>
<body id="home">
<!-- #include virtual="/inc/overall_header.asp" -->
<div class="right"><img src="/images/mikimoto.jpg" alt="Gasser Jewelers proudly presents Mikimoto pearl jewelry" /></div>
<div><img src="/images/trustedJeweler.png" alt="Trusted Jeweler" /></div>
<p>Serving our loyal customers for more than 65 years, we offer unique personal attention to help you celebrate life's important occasions.</p>
<div><img src="/images/personalAttention.png" alt="Personal Attention" /></div>
<p>Carefully selecting from the world's finest designers, we bring together exclusive collections of gems, diamonds, jewelry, fine watches and giftware.</p>
<p>You are invited to experience for yourself one of Ohio's finest independent jewelry stores. We take pleasure in helping you find just the right gift while providing an enjoyable atmosphere and a feeling of trust you should expect from your jeweler.</p>
<ul>
<li><a href="101">The Gasser Tradition</a></li>
<li><a href="102">Visit Our Store</a></li>
<li><a href="103">Full Service Bridal Registry</a></li>
</ul>
<!-- #include virtual="/inc/overall_footer.asp" -->
</body>
</html>[/syntax:fa623f4087]
Big difference there! You don't have to know ASP to leverage that kind of efficiency :)
RCMV
December 3rd, 2004, 18:31
<snip></snip>I think you'd be better served to find out what the purpose of employing the ASP platform was in the first place. If it's something as complex as database-driven content, you might want to consider "skinning" around the given mechanisms (not that hard to do, actually). If it's something simple, like a system of includes, you might want to take advantage of them.
The client has no idea why ASP was used, from what I can see the site seems to be some sort of template site. I don't know how you would tell if it is database driven, but the asp files do not seem to have any include statements.
here is a partial copy of one of the asp files:
I don't understand what the code inside the <% stuff in here %> is for or whether it is for a database. :(
body class="prtlBody" lang="en" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<TABLE cellspacing="0" cellpadding="0" width="100%" bgcolor="#8EBFE7" border=0 height="53" background="../branding_image.jpg">
<TR valign="bottom">
<td height="48" colspan="2">
<table width="100%" height="74" cellpadding="0" cellspacing="0">
<tr><form method="GET" action="http://www.gov.ns.ca/snsmr/gsa.asp">
<td align="right" valign="bottom">
<input type="text" name="q" size="20" maxlength="256" value="">
<input name="site" type="hidden" id="site" value="master_collection" />
<input name="client" type="hidden" id="client" value="master_collection" />
<input name="proxystylesheet" type="hidden" id="proxystylesheet" value="http://www.gov.ns.ca/snsmr/xslt/municipal/municipal.xslt" />
<input name="output" type="hidden" id="output" value="xml_no_dtd" />
<input type="hidden" name="restrict" id="restrict" value="NSMUN_CBRM">
<input type="hidden" name="h" id="h" value="" />
<input type="hidden" name="i" id="i" value="branding_image.jpg" />
<input type="hidden" name="t" id="t" value="80" />
<input type="hidden" name="w" id="w" value="600" />
<input type="hidden" name="r" VALUE="NSMUN_CBRM">
<input border="0" name="go" VALUE="Google Search" src="../images/search_button.gif" width="47" height="18" type="image">&nbsp;&nbsp;<br>
<a href="../contact/default.asp" class="prtlTopNavLnk2" target="_top"><font color="#FFFFFF">
Contact us</font></a>&nbsp;&nbsp; <a href="../contact/default.asp" class="prtlTopNavLnk2" target="_top"><font color="#FFFFFF">Website
Feedback</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;
</td>
</form>
</tr>
</table>
</td>
</TR>
</TABLE>
<%
'dim sltBoldBusiness, cropStringBusiness
cropStringBusiness = "dev1/" 'change this to match tree location of scripts
sltBoldBusiness = request.ServerVariables("myscript")
'make it all lowercase, crop out the crop String, get 4 characters
'sltBoldBusiness = Lcase(Mid(sltBoldBusiness, (Len(cropStringBusiness)+1) , 4))
%>
<%
dim sltBoldBusiness, cropStringBusiness
cropStringBusiness = "business/" 'change this to match tree location of scripts
sltBoldBusiness = request.ServerVariables("SCRIPT_NAME")
'make it all lowercase, crop out the crop String, get 4 characters
sltBoldBusiness = Lcase(Mid(sltBoldBusiness, (Len(cropStringBusiness)+1) , 4))
%>
any clarification of this would certainly be a great help Paul
P.S. If you want to have a look at the site
http://www.stewiacke.net
[/code]
the_pm
December 3rd, 2004, 18:40
Oh please God, save this site from itself!
I've seen you working on this site in the past, Mr. K. When in doubt, follow the trail. Look for any indicators in the scripts written into a page that point to other files. Then open those files and see what's happening and where they are pulling their information. Keep following the trail until you get a clear picture of what the original bit of scripting is pulling into the page. Hopefully, it's clear enough by looking at the code, or the original developer was kind enough to comment his/her work well. You'd be surprised what you can decipher without even knowing how to write the code itself!
Without backend access, there's probably very little anyone can help you to figure things out, and I do not suggest posting FTP information here for the site ;)
But consider using includes anyway, even if they're not using them themselves. I'm telling you, once you go the includes route, you'll never make a site without them again!
websterworld
December 3rd, 2004, 19:01
RCMV I think you are a bit unclear about what ASP is and how it actually works.
ASP is a server side language, its native to windows and thus mostly runs by people who host with windows servers. (It can be run under Apache/Linux, but really shouldnt be. PHP is a server side language native to Linux and it can be run much more successfully under windows - FYI)
So what does the ASP actually do?
Well, it handles data dynamically.
For example you have a stock market website.
The way the data is output, the way the site looks and feels, 'etc, 'etc is handled by the HTML/CSS files. Its static.
The actual stock info being updated and pulled and then displayed in its designated area is a dynamic operation handled by the server side language in action... in your case, ASP.
So in order to 'redo' the site in HTML/CSS you need to figure out what exactly are you 'redoing'.
If you want to just take those pages and simply make static HTML pages out of them, copy the files and change the extension to html. Its that simple. :P
If however, the site has a backend system and its dynamic (I cant stress this enough), you need to figure out what are the various dynamic portions of it (stocks, calender, date, whatever) and make clones in PHP or another language.
Egh, I cant explain better then that.
ethicaldesign
December 3rd, 2004, 19:06
:eeek: how big is that graphic on the front page! It downloaded at a crawl even on my ADSL connection (dread to think how long you'd be waiting on dialup!).
It's hard to tell what the ASP is being used for from the post above (my guess is that it's a templating system that's been used for the site). If there are database driven aspects as paul pointed out then it probably won't be a simple matter of just converting it to static html/css because the content for some pages will need to be pulled from the database.
Do they have a background administration system where they can update content themselves through a web interface? If so that might be an indication of what the ASP is being used for.
Looking at the way that site is put together and how it appears to work (i.e. not very well - there are errors all over the place) then even if it is using a database in the background my approach would just be to re-write the whole thing from scratch anyway. I don't envy you trying to decipher all of that.
Judging from the large numbers of actual pages (which wouldn't exist if it were properly database driven - unless a rewriting engine were used but I doubt it in this case), my guess is that it's just a templating system. If that's the case then you could effectively do that with html/css and includes as paul pointed out.
RCMV
December 3rd, 2004, 19:52
Oh please God, save this site from itself!
I hear that :lol:
I've seen you working on this site in the past, Mr. K.
You're right there, Paul, but just to clarify " I had NOTHING to do with any aspect of this site!. I can post a link to the site that I made a couple of years ago.
Thanks for the help :) [/quote]
RCMV
December 3rd, 2004, 20:01
If however, the site has a backend system and its dynamic (I cant stress this enough), you need to figure out what are the various dynamic portions of it (stocks, calender, date, whatever) and make clones in PHP or another language.
From what I can determine so far, the only thing that seems to be dynamic is a weather updating portion, which I can redo in PHP. The site is currently hosted on a Linux server for whatever reason. and they have been trying to make changes to the site using FP 2003 but to no avail, and this is why they contacted me for help again ( after throwing away the site I originally did for them basically pro bono)(in case you are wondering, I am charging them $50 Canadian / hr for my so-called "expertise" and am on the clock right now")
RCMV
December 3rd, 2004, 20:08
:eeek: how big is that graphic on the front page! It downloaded at a crawl even on my ADSL connection (dread to think how long you'd be waiting on dialup!).
it took me 3 min 8 seconds on 56k dialup
It's hard to tell what the ASP is being used for from the post above (my guess is that it's a templating system that's been used for the site).
That was my first guess as well and that seems to be the case from what I can tell right now.
Do they have a background administration system where they can update content themselves through a web interface? If so that might be an indication of what the ASP is being used for.
They have nothing at the moment except the files and access to the server, but no one there even knows how to access the server, they just gave me the info and we are going from there
my guess is that it's just a templating system. If that's the case then you could effectively do that with html/css and includes as paul pointed out.
thanks for the help
RCMV
December 3rd, 2004, 21:49
quick update on this post:
After wading through a ton of pages and files, I have found that this is indeed a template site ( done in Dreamweaver) and that it does use includes and also has an Access DB backend.
The interesting thing to note however is that it seems that whoever did this site simply stole all the code fron another website and then tried to modify it to work for this client. I will not be working or posting on this again until I have discussed this with the administrator of the Town of Stewiacke (stolen website) http://www.stewiacke.net
Original website:
http://www.cbrm.ns.ca/portal/default.asp
Thanks for all the help, everyone
Cheers, Ross
ethicaldesign
December 4th, 2004, 02:39
Could it not be the case that it's a custom application that's been specifically written for this sort of site, and it's just been rolled out for use for that town? Mightn't be a case of the designer stealing, but simply reusing some of his previous code or licencing it from somone else.
Just realised why it's displaying all of the asp code rather than actually parsing it aswell (you say it's hosted on linux servers - doesn't look like there's a version of ASP set up on them or the asp extension is mapped properly!).
Good luck sorting it out anyway :)
RCMV
December 4th, 2004, 22:43
Could it not be the case that it's a custom application that's been specifically written for this sort of site, and it's just been rolled out for use for that town? Mightn't be a case of the designer stealing, but simply reusing some of his previous code or licencing it from somone else.
My applogies everyone, It seems that ethicaldesign was partly correct in his statement above. After contacted the CAO for Stewiacke and the webmaster from CBRM, it turns out that this is actually a template designed and available freely for use by all Nova Scotia Towns. But what has happened here is that the designer for Stewiacke simply took the modified code from the CBRM site without their knowledge or consent and then tried to modify it to create the Stewiacke site. The webmaster for CBRM gave me the link to the actual template site and documentation. Currently they are the only Municipality using this template and have modified it specifically for their site. I now have the original code and documentation.
Just realised why it's displaying all of the asp code rather than actually parsing it aswell (you say it's hosted on linux servers - doesn't look like there's a version of ASP set up on them or the asp extension is mapped properly!). Good luck sorting it out anyway :)
After looking at the original template, it seems that the designer for Stewiacke just copied all of the include files code and placed it directly in the default.asp files to try and avoid using includes.
I have now been asked to redesign the site, with the same look and feel, and make it standards compliant. Now I have to try and create a template that will allow for easy user updates and possibly provide training on maintaining the site. So it looks like I am going to be busy for a while.
Cheers, Ross
vBulletin® v3.6.8, Copyright ©2000-2012, Jelsoft Enterprises Ltd.