Building a Static ASP.NET Website in a Basic Hosting Environment
(Page 1 of 4 )
If you understand the basics of ASP.NET and want to take things further, this two-part article series may be exactly what you're looking for. As you probably guessed from the title, it will show you how to build a multi-page static website using this platform.
This introductory article on ASP.NET discusses the details pertaining the importance and advantages of using ASP.NET as your website platform. It also highlights the basic requirements and installation steps of Visual Web Developer Express, the software application that you will be using to make ASP.NET powered websites.
Briefly discussed in that introductory article is how to create your first ASP.NET web page. In this two-part tutorial series, we will go deeper; you will actually use ASP.NET to build static websites, not just one web page. If you haven’t read the introductory article linked to above, please do that now; it contains information that is essential to your understanding of this tutorial series.
What are Static Websites?
This tutorial is about building static websites. In case you are not sure what static websites are, I've explained them in detail below.
Websites found on the Internet are typically separated into two types, static and dynamic. Static websites operate without relying on a website database and do not require server-side scripting to output HTML to the browser (for example: ASP, Visual Basic, etc). Databases (MS Access/SQL Server in Microsoft) are used to store website information or content. So if you are developing a website with text content that is not found in a database, but in the website source code itself, and does not require executing of server side scripts, then you are developing a static website.
Below is a purely static coded example:
<html>
<head>
<title> This is your title tag </title>
</head>
<body>
<h2> This is your website header tag </h2>
<br />
<p> Hi this is your content! The quick brown fox jumps over the lazy dog</p>
</body>
</html>
Dynamic websites rely heavily on databases to output information or execute server side scripting to output HTML content. Below is a dynamically coded example in VBscript (server side scripting in ASP/ASP.NET websites) outputting the same information to the browser as the statically coded example:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>This is your title tag</title>
</head>
<body>
<%
Dim headertag
headertag = "This is your website header tag"
Dim textualcontent
textualcontent = "Hi this is your content! The quick brown fox jumps over the lazy dog."
%>
<h2> <% Response.Write(headertag)%> </h2>
<br />
<p> <% Response.Write(textualcontent)%></p>
</body>
</html>
Next: The Essential First Step: Website Layout Design Plan >>
More ASP.NET Articles
More By Codex-M