[Home]
[Contents]
[Syllabus]
[Homework]
[Handouts]
[Exams]
[Miscellaneous]
Dynamic Table
ASP Source Code
<% Option Explicit %>
<?xml version="1.0" encoding="UTF-8" ?>
<!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"
xml:lang="en" lang="en"
>
<head>
<title>Dynamic Table Example (a)</title>
<%
Dim intNumRows, intRowNum
intNumRows = Request("rows")
If intNumRows = 0 Then intNumRows = 3
%>
</head>
<body>
<div align="center">
<h1>Welcome to Flybai-Knight Industries</h1>
<table align="center" cellspacing="5"
border="5">
<% For
intRowNum = 1 to intNumRows %>
<tr>
<td width="50" align="center"> <% =intRowNum %>
</td>
<td width="100"> </td>
<td width="100"> </td>
<td width="100"> </td>
</tr>
<% Next %>
</table>
<span
style="color:red;font-weight:bold;margin-right:100px;margin-left:10%;">
To change the number of rows, add <em>?rows=n</em>
(where <em>n</em> is the number of rows) to the URL in the
address bar
above
</span>
<h2><em>How do you like our dynamic table page?</em></h2>
</div>
</body>
</html>