Hi,
I'm new to ASP and some of the pages I've written before have simply been copies and modifications to pages previously written for different purposes. Which all work fine, however I've recently bought MS Visual Web Developer so that I could write my pages from scratch but the whole page is designed differently... I just wondered what was the best way to write these pages?
This is going to be quite long so I apologise. For example, using visual web my page looks like this:
<%@ 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">
<link href="Style.css" rel="stylesheet" type="text/css" />
<title>Learning and Development</title>
</head>
<body>
<form id="form1" runat="server">
<asp

qlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:CourseEvaluations_BeConnectionSt ring %>"
ProviderName="<%$ ConnectionStrings:CourseEvaluations_BeConnectionSt ring.ProviderName %>"
DeleteCommand="..."
SelectCommand="..."
<DeleteParameters>
<asp:Parameter Name="EventID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="CourseDate" Type="DateTime" />
<asp:Parameter Name="CourseID" Type="Int32" />
<asp:Parameter Name="VenueID" Type="Int32" />
<asp:Parameter Name="CourseAttending" Type="Double" />
<asp:Parameter Name="EventID" Type="Int32" />
</UpdateParameters>
Where as, using the previous written pages, it looks like this;
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0;"
conn.Open(Server.MapPath(".") & "\CourseEvaluations_Be.mdb")
nItemsPerPage = 15
%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Event List</title>
<link rel="stylesheet" type="text/css" href="style.css">
<body>
<%
sql="..."
set rs = Server.CreateObject("ADODB.recordset")
rs.CursorLocation = 3
rs.Open sql, conn
If rs.eof Then
response.Write("No course records in database.")
rs.close
conn.close
response.End
End If
%>
<% response.Write(rs.fields("CourseAttending")) %>
<% response.Write(rs.fields("CountOfEventID")) %>
<%
rs.movenext
loop
%>
Sorry if this is confusing.