What is ASP?

I see some web pages have ASP extension rather than HTML but the source code is HTML

I did a search and found http://www.w3schools.com/asp/

So, my question is, what exactly is ASP? Why would you use it over HTML?

.asp is Active Server Pages.

go here for more :

http://msdn.microsoft.com/workshop/server/asp/asptutorial.asp

“Microsoft® Active Server Pages (ASP) is a server-side scripting technology that can be used to create dynamic and interactive Web applications. An ASP page is an HTML page that contains server-side scripts that are processed by the Web server before being sent to the user’s browser. You can combine ASP with Extensible Markup Language (XML), Component Object Model (COM), and Hypertext Markup Language (HTML) to create powerful interactive Web sites.”

ASP (which stands for Active Server Pages) is a technology that lets you generate webpages on the fly, instead of whenever the webmaster gets around to it. While you can use it for something as simple as displaying the time of day when the page was requested, it’s more often used for displaying information from a database.

What I’ve done with it is had the user fill in a form, then get data from a database based on their choices in the form. I would then take that data and build a pretty formatted table out of it.

The reason to use ASP over HTML is very simple: it allows you to write one script that will generate different pages based on user input. Hope this is helpful.

oops… i forgot to answer the “why” question :slight_smile:

ok, basically you’d use .asp over .html if you needed to do stuff that .html can’t do…and there’s lots of stuff that .asp can do but .html can’t.

example : A news site wants to be able to display the headlines on their front page, with new headlines coming in every few minutes. This would be a mad task to implement using .html 'coz you’d have to get someone to physically write the news into the .html code every few minutes.

Using .asp, this same problem can be tackled in a much easier manner. the .asp page contains a line of code telling it to pick up the latest headlines from the master database of news articles…this data is then dynamically written into the .html page that is outputted into the end-user’s browser.

this example is only indicative of the possibilities that scripting allows you…use a bit of common sense and a dab of imagination and you can come up with a lot of your own ideas.

another example: .html alone would not be able to handle something like this message board. scripting would be needed to create something like this board. so .asp is not the only scripting language out there…but it’s pretty neat.

Thanks, now I understand why it is used in the news sites where I noticed it