HTMl to ASP Convert

MCSports's picture

He has: 11 posts

Joined: Dec 2005

Hey guys....I built my website (MayesCountySports.com) a year ago in html, and now I want to add some things (a user login screen). But to do that, I was told I need my pages in asp.

I am not familiar with asp AT ALL!

Does anybody know of a way I can convert these html files into asp? I found this on the net, but I don't have a clue if this will work or not.
http://www.chrishardy.co.uk/asp/tools/html-to-response-write-converter.asp

Thanks!

They have: 1 posts

Joined: Feb 2006

Hi, that's actually my site you've come across there, I found your post through my server logs Smiling

The tool you've linked to is a developer's shortcut to output HTML code from ASP. ASP (Active Server Pages) basically does a lot of the "behind the scenes" stuff that you see around the web. Whereas HTML determines how a web page looks, ASP determines how it acts. In your case, you would need the ASP to check a database for a valid username and password when somebody tries to login in to your site. The ASP would check if your visitor's login details are correct, then allow them access to certain pages if they are.

Do you know if your website host supports ASP?

They have: 2 posts

Joined: Feb 2006

Hello, asp is not the only choice, jsp/php can do the same thing for you.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

In looking up your site, it looks like the place you have it hosted at offers PHP, not ASP. (they are two different languages, but both are Server Side languages that run programs on the server when called and send their output to the browser.

Both languages can do what you want, and IMO, unless you have a particular need for one over the other, use the one that your hosting company provides if you are happy with their service.

Also with PHP (I beleive the same thing applies for ASP), you can take your .html files, rename them .php and they are fine. PHP processes them and only acts upon things inside the tags for PHP

<?php
<p>This is your regular html page</p>
<
p>Nothing different here from after renaming the file</p>


  
// This is PHP code that you will be processed on the server
   // In the browser you will only see OUTPUT from what is processed here

  
$variable = \"Greg\";

   echo \"<p>Hello \" .
$variable . \"</p>\";


<p>Back to your regualr HTML code</p>
?>

To simplify converting your site over, on all the pages you need to check if the person is logged in, after you rename the file, you can add the following to the very top:

<?php
include \"checklogin.php\";
?>

This tells PHP to take the file checklogin.php and act like all the code from that file is right there in this file. Then in that checklogin.php you can do all the checking to make sure they are logged in, and if not, give them a log in page. While this part youd have to figure out how to do, all of your pages you want protected are easy to convert.

-Greg

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.